-
Notifications
You must be signed in to change notification settings - Fork 60
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
Bearer Token #87
Comments
I have discovered. I think we could add it into the README documentation since it will help others. If you allow, I will create a fork adding this section. For who is also trying to configure it, just follow the bellow steps:
this.express.use(swagger.express(
{
definition: {
info: {
title: 'Backend',
version: '0.0.1'
},
host: 'localhost:3000',
securityDefinitions: {
bearerAuth: {
type: SwaggerDefinitionConstant.Security.Type.API_KEY,
in: SwaggerDefinitionConstant.Security.In.HEADER,
name: 'Authorization'
}
}
}
}
))
@ApiPath({
path: '/companies',
name: 'Company',
security: {
bearerAuth: []
}
}) In the swagger authorization don't forget to put the access token in the follow format: |
Hi! Thank You so much for this solution. I have another doubt. I want to upload a file in one of the APIs. I am not able to figure out how to achieve this. It would be really helpful if you can help me out with this. |
Hey, how u doing?
How should I configure the
ApiPath
annotation to accept bearer authentication?Thank you
The text was updated successfully, but these errors were encountered: