Last active
June 10, 2018 06:40
-
-
Save wellingtonjhn/ff57550ad4910165aaaae2ac9a84b84c to your computer and use it in GitHub Desktop.
Swagger Auth Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| services.AddSwaggerGen(options => | |
| { | |
| // ... código omitido | |
| options.AddSecurityDefinition( | |
| "bearer", | |
| new ApiKeyScheme | |
| { | |
| In = "header", | |
| Description = "Autenticação baseada em Json Web Token (JWT)", | |
| Name = "Authorization", | |
| Type = "apiKey" | |
| }); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment