diff options
author | Morgan Chen <morganchen12@gmail.com> | 2018-06-21 12:10:05 -0700 |
---|---|---|
committer | Morgan Chen <morganchen12@gmail.com> | 2018-06-26 15:47:26 -0700 |
commit | 21116161f92eda06389daaef670aa593aa588bcd (patch) | |
tree | 92facb87e3c6dff09c952ea60e0042351b898e5c /Firebase/Auth/Source/FIRAuthErrorUtils.h | |
parent | 39176ba0f444e8e99af869126dff9811c743ca40 (diff) |
Fix bad parsing of JWT dates
Diffstat (limited to 'Firebase/Auth/Source/FIRAuthErrorUtils.h')
-rw-r--r-- | Firebase/Auth/Source/FIRAuthErrorUtils.h | 13 |
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 |