private static SwaggerOwinSettings ConfigureIdentity(this SwaggerOwinSettings settings, MyUrlsOptions urlOptions) { settings.DocumentProcessors.Add( new SecurityDefinitionAppender(Constants.SecurityDefinition, SwaggerHelper.CreateOAuthSchema(urlOptions))); settings.OperationProcessors.Add(new OperationSecurityScopeProcessor(Constants.SecurityDefinition)); return(settings); }
public static SwaggerSettings <T> ConfigureIdentity <T>(this SwaggerSettings <T> settings, MyUrlsOptions urlOptions) where T : SwaggerGeneratorSettings, new() { settings.GeneratorSettings.DocumentProcessors.Add( new SecurityDefinitionAppender( Constants.SecurityDefinition, SwaggerHelper.CreateOAuthSchema(urlOptions))); settings.GeneratorSettings.OperationProcessors.Add(new ScopesProcessor()); return(settings); }
private void GenerateSecurityDefinitions() { document.SecurityDefinitions.Add("OAuth2", SwaggerHelper.CreateOAuthSchema(urlOptions)); }