Пример #1
0
 internal static string GetAuthDescription(auth_stat state)
 {
     switch(state)
     {
         case auth_stat.AUTH_BADCRED:
             return "bad credential (seal broken)";
         case auth_stat.AUTH_BADVERF:
             return "bad verifier (seal broken)";
         case auth_stat.AUTH_FAILED:
             return "unknown reason";
         case auth_stat.AUTH_INVALIDRESP:
             return "bogus response verifier";
         case auth_stat.AUTH_OK:
             return "success";
         case auth_stat.AUTH_REJECTEDCRED:
             return "client must begin new session";
         case auth_stat.AUTH_REJECTEDVERF:
             return "verifier expired or replayed";
         case auth_stat.AUTH_TOOWEAK:
             return "rejected for security reasons";
         case auth_stat.RPCSEC_GSS_CREDPROBLEM:
             return "no credentials for user";
         case auth_stat.RPCSEC_GSS_CTXPROBLEM:
             return "problem with context";
         default:
             return string.Format("unknown state: {0}", state);
     }
 }
Пример #2
0
 internal static AuthenticateException AuthError(reply_body replyBody, auth_stat state)
 {
     return new AuthenticateException(replyBody, GetAuthDescription(state));
 }
Пример #3
0
 internal static AuthenticateException AuthError(reply_body replyBody, auth_stat state)
 {
     return(new AuthenticateException(replyBody, GetAuthDescription(state)));
 }