Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "Bearer Authentication" for the whole API #67

Open
ffflorian opened this issue Aug 7, 2019 · 0 comments
Open

Add support for "Bearer Authentication" for the whole API #67

ffflorian opened this issue Aug 7, 2019 · 0 comments

Comments

@ffflorian
Copy link
Member

ffflorian commented Aug 7, 2019

Bearer Authentication for the whole API can be enabled in Swagger when applying a security property.

swagger.json

{
 "paths": {
   // ...
 },
 "security": [
   {
     "Bearer": []
   }
 ],
 "swagger": "2.0",
}

Let's implement a general authorization setting (as suggested in #62 (comment)).

Suggestion

async deleteById(id: string): Promise<void> {
  const config: AxiosRequestConfig = {
    headers: {
      Authorization: this.config.accessToken,
    },
    method: 'delete',
    url: `/identity-providers/${id}`,
    withCredentials: true,
  };

  await this.apiClient.request(config);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants