Пример #1
0
 internal static string GetErrorTypeString(RegistrationErrorType error) {
     switch (error) {
         case RegistrationErrorType.InvalidRedirectUri:
             return "invalid_redirect_uri";
         case RegistrationErrorType.InvalidClientMetadata:
             return "invalid_client_metadata";
         default:
             throw new NotImplementedException();
     }
 }
Пример #2
0
 internal static string GetDefaultErrorTypeDescription(RegistrationErrorType error) {
     switch (error) {
         case RegistrationErrorType.InvalidRedirectUri:
             return "One or more redirect_uri values are invalid";
         case RegistrationErrorType.InvalidClientMetadata:
             return "One of the Client Metadata fields is invalid and the server has rejected this request";
         default:
             throw new NotImplementedException();
     }
 }
Пример #3
0
 public ClientRegistrationError(RegistrationErrorType error, string description = null) {
     this.Error = GetErrorTypeString(error);
     this.ErrorDescription = String.IsNullOrWhiteSpace(description) ? GetDefaultErrorTypeDescription(error) : description;
 }
Пример #4
0
 public ValidationResult(RegistrationErrorType error, string description = null) {
     this.ErrorType = error;
     this.Description = description;
     this.Success = false;
 }
 public OpenIdClientRegistrationResult(RegistrationErrorType error, string description) {
     this.ErrorType = error;
     this.Description = description;
     this.Success = false;
 }
Пример #6
0
 public NewUserRegistrationException(RegistrationErrorType reason)
     : base()
 {
     Reason = reason;
 }
Пример #7
0
 public NewUserRegistrationException(RegistrationErrorType reason, string message, Exception inner)
     : base(message, inner)
 {
     Reason = reason;     //might as well create a custom message?
 }