Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new instance of the <see cref="OAuth2SecuritySchemeBuilder"/> class.
 /// </summary>
 /// <param name="value">The <see cref="OAuth2SecurityScheme"/> to copy values from.</param>
 public OAuth2SecuritySchemeBuilder(OAuth2SecurityScheme value)
     : base(value)
 {
     if (value is null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     ImplicitFlow          = value.ImplicitFlow;
     PasswordFlow          = value.PasswordFlow;
     ClientCredentialsFlow = value.ClientCredentialsFlow;
     AuthorizationCodeFlow = value.AuthorizationCodeFlow;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new instance of the <see cref="OAuth2SecurityScheme"/> class.
 /// </summary>
 /// <param name="description">The short description for security scheme.</param>
 /// <param name="implicitFlow">The configuration for the OAuth Implicit flow.</param>
 /// <param name="passwordFlow">The configuration for the OAuth Password flow.</param>
 /// <param name="clientCredentialsFlow">The configuration for the OAuth Credentials flow.</param>
 /// <param name="authorizationCodeFlow">The configuration for the OAuth Authorization flow.</param>
 public OAuth2SecurityScheme(
     string description              = default,
     OAuthFlow implicitFlow          = default,
     OAuthFlow passwordFlow          = default,
     OAuthFlow clientCredentialsFlow = default,
     OAuthFlow authorizationCodeFlow = default)
     : base(description)
 {
     ImplicitFlow          = implicitFlow;
     PasswordFlow          = passwordFlow;
     ClientCredentialsFlow = clientCredentialsFlow;
     AuthorizationCodeFlow = authorizationCodeFlow;
 }