/// <summary>
 /// Creates a new instance of the <see cref="OasOAuth2SecuritySchemeBuilder"/> class.
 /// </summary>
 /// <param name="value">The <see cref="OasOAuth2SecurityScheme"/> to copy values from.</param>
 public OasOAuth2SecuritySchemeBuilder(OasOAuth2SecurityScheme value)
     : base(value)
 {
     if (value is null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     ImplicitFlow          = value.ImplicitFlow;
     PasswordFlow          = value.PasswordFlow;
     ClientCredentialsFlow = value.ClientCredentialsFlow;
     AuthorizationCodeFlow = value.AuthorizationCodeFlow;
 }
Exemple #2
0
 /// <summary>
 /// Creates a new instance of the <see cref="OasOAuth2SecurityScheme"/> 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 OasOAuth2SecurityScheme(
     string description                 = default,
     OasOAuthFlow implicitFlow          = default,
     OasOAuthFlow passwordFlow          = default,
     OasOAuthFlow clientCredentialsFlow = default,
     OasOAuthFlow authorizationCodeFlow = default)
     : base(description)
 {
     ImplicitFlow          = implicitFlow;
     PasswordFlow          = passwordFlow;
     ClientCredentialsFlow = clientCredentialsFlow;
     AuthorizationCodeFlow = authorizationCodeFlow;
 }