Last active
June 24, 2020 06:43
-
-
Save PradeepLoganathan/aeedbdfc22fcf936ea78c5fee2ba4203 to your computer and use it in GitHub Desktop.
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
| OpenApiSecurityScheme securityScheme = new OpenApiSecurityScheme() | |
| { | |
| Type = SecuritySchemeType.OAuth2, | |
| Flows = new OpenApiOAuthFlows | |
| { | |
| AuthorizationCode = new OpenApiOAuthFlow | |
| { | |
| AuthorizationUrl = new Uri("/auth-server/connect/authorize", UriKind.Relative), | |
| TokenUrl = new Uri("/auth-server/connect/token", UriKind.Relative), | |
| Scopes = new Dictionary<string, string> | |
| { | |
| {"readAccess", "Access read operations"}, | |
| {"writeAccess", "Access write operations"} | |
| } | |
| } | |
| } | |
| }; | |
| options.AddSecurityDefinition("oauth2", securityScheme); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment