Пример #1
0
 public static OpenIDJwtBinding GetBindingForDocument(OpenIDDocument document, BindingType bindingType, XmlSignatureAlgorithmType?signatureAlgorithm)
 {
     return(bindingType switch
     {
         BindingType.Null => throw new IdentityProviderException("Cannot have null binding type"),
         BindingType.Form => new OpenIDJwtFormBinding(document, signatureAlgorithm),
         BindingType.Query => new OpenIDJwtQueryBinding(document, signatureAlgorithm),
         BindingType.Stream => throw new IdentityProviderException("Json Web Tokens do not support content binding"),
         _ => throw new NotImplementedException(),
     });
Пример #2
0
 public static OpenIDBinding GetBindingForDocument(OpenIDDocument document, BindingType bindingType)
 {
     return(bindingType switch
     {
         BindingType.Null => throw new IdentityProviderException("Cannot have null binding type"),
         BindingType.Form => new OpenIDFormBinding(document),
         BindingType.Query => new OpenIDQueryBinding(document),
         BindingType.Stream => new OpenIDStreamBinding(document),
         _ => throw new NotImplementedException(),
     });