protected Security(string name, SecurityScheme securityType, OpenApiSecuritySchemeType type, OpenApiSecurityApiKeyLocation @in) { Name = name; SecurityType = securityType; Type = type; In = @in; }
public SecurityOAuth(string name, OpenApiSecuritySchemeType type, OpenApiSecurityApiKeyLocation @in, Dictionary <string, string> scopes, string tokenUrl, OpenApiOAuth2Flow flow) : base(name, SecurityScheme.OAuth, type, @in) { Scopes = scopes; TokenUrl = tokenUrl; Flow = flow; }
public SecurityBasic(string name, OpenApiSecuritySchemeType type, OpenApiSecurityApiKeyLocation @in, string description) : base(name, SecurityScheme.Basic, type, @in) { Description = description; }
/// <summary> /// Initializes the <see cref="OperationSecurityProcessor"/> with the given name (which should match the name of /// your <see cref="SecurityDefinitionAppender"/>) and <see cref="OpenApiSecuritySchemeType"/>. /// </summary> /// <param name="name">The name of your Swagger security definition (which should match the name you gave to /// your <see cref="SecurityDefinitionAppender"/>).</param> /// <param name="type">The type of the scheme.</param> /// <param name="location">If the type was <see cref="OpenApiSecuritySchemeType.ApiKey"/>, the expected location of the key, otherwise null.</param> public OperationSecurityProcessor(string name, OpenApiSecuritySchemeType type, OpenApiSecurityApiKeyLocation?location = null) { _name = name; _securitySchemeType = type; _location = location; }