コード例 #1
0
 public static UserValidationResult Invalid(UserValidationStatus status, string errorMessage = null, User user = null)
 {
     DbUtil.LogActivity($"Invalid log in {status}:{errorMessage} ({user?.Username})");
     return(new UserValidationResult {
         User = user, ErrorMessage = errorMessage, Status = status
     });
 }
コード例 #2
0
        private static int MapStatusToError(UserValidationStatus status)
        {
            switch (status)
            {
            case UserValidationStatus.Success:
                return(BaseMessage.API_ERROR_NONE);

            case UserValidationStatus.PinExpired:
                return(BaseMessage.API_ERROR_PIN_EXPIRED);

            case UserValidationStatus.PinInvalid:
                return(BaseMessage.API_ERROR_PIN_INVALID);

            case UserValidationStatus.SessionTokenExpired:
                return(BaseMessage.API_ERROR_SESSION_TOKEN_EXPIRED);

            default:
                return(BaseMessage.API_ERROR_SESSION_TOKEN_NOT_FOUND);
            }
        }
コード例 #3
0
ファイル: MobileAPIController.cs プロジェクト: vanutama/bvcms
 private static int MapStatusToError(UserValidationStatus status)
 {
     switch (status)
     {
         case UserValidationStatus.Success:
             return BaseMessage.API_ERROR_NONE;
         case UserValidationStatus.PinExpired:
             return BaseMessage.API_ERROR_PIN_EXPIRED;
         case UserValidationStatus.PinInvalid:
             return BaseMessage.API_ERROR_PIN_INVALID;
         case UserValidationStatus.SessionTokenExpired:
             return BaseMessage.API_ERROR_SESSION_TOKEN_EXPIRED;
         default:
             return BaseMessage.API_ERROR_SESSION_TOKEN_NOT_FOUND;
     }
 }
コード例 #4
0
 public static UserValidationResult Invalid(UserValidationStatus status, string errorMessage = null, User user = null)
 {
     return new UserValidationResult { User = user, ErrorMessage = errorMessage, Status = status };
 }
コード例 #5
0
 public static UserValidationResult Invalid(UserValidationStatus status, string errorMessage = null, User user = null)
 {
     return(new UserValidationResult {
         User = user, ErrorMessage = errorMessage, Status = status
     });
 }