Exemplo n.º 1
0
 protected Security(string name, SecurityScheme securityType,
                    OpenApiSecuritySchemeType type, OpenApiSecurityApiKeyLocation @in)
 {
     Name         = name;
     SecurityType = securityType;
     Type         = type;
     In           = @in;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 public SecurityBasic(string name,
                      OpenApiSecuritySchemeType type, OpenApiSecurityApiKeyLocation @in,
                      string description) : base(name, SecurityScheme.Basic, type, @in)
 {
     Description = description;
 }
Exemplo n.º 4
0
 /// <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;
 }