aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Auth/Source/FIRAuthErrorUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'Firebase/Auth/Source/FIRAuthErrorUtils.h')
-rw-r--r--Firebase/Auth/Source/FIRAuthErrorUtils.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Firebase/Auth/Source/FIRAuthErrorUtils.h b/Firebase/Auth/Source/FIRAuthErrorUtils.h
index 5b8205f..6cc22ab 100644
--- a/Firebase/Auth/Source/FIRAuthErrorUtils.h
+++ b/Firebase/Auth/Source/FIRAuthErrorUtils.h
@@ -85,6 +85,19 @@ NS_ASSUME_NONNULL_BEGIN
*/
+ (NSError *)unexpectedErrorResponseWithDeserializedResponse:(id)deserializedResponse;
+/** @fn malformedJWTErrorWithToken:underlyingError:
+ @brief Constructs an @c NSError with the code set to @c FIRAuthErrorCodeMalformedJWT and
+ populates the userInfo dictionary with an error message, the bad token, and an underlying
+ error that may have occurred when parsing.
+ @param token The token that failed to parse.
+ @param underlyingError The error that caused this error. If this parameter is nil, the
+ NSUnderlyingErrorKey value will not be set.
+ @remarks This error is returned when JWT parsing fails.
+ @returns An @c FIRAuthErrorCodeMalformedJWT error wrapping an underlying error, if available.
+ */
++ (NSError *)malformedJWTErrorWithToken:(NSString *)token
+ underlyingError:(NSError *_Nullable)underlyingError;
+
/** @fn unexpectedResponseWithData:underlyingError:
@brief Constructs an @c NSError with the @c FIRAuthInternalErrorCodeUnexpectedResponse
code, and a populated @c FIRAuthErrorUserInfoDataKey key in the @c NSError.userInfo