AppAuth
OIDErrorUtilities.h
Go to the documentation of this file.
1 
19 #import <Foundation/Foundation.h>
20 
21 #import "OIDError.h"
22 
23 NS_ASSUME_NONNULL_BEGIN
24 
27 @interface OIDErrorUtilities : NSObject
28 
36 + (NSError *)errorWithCode:(OIDErrorCode)code
37  underlyingError:(nullable NSError *)underlyingError
38  description:(nullable NSString *)description;
39 
49 + (NSError *)OAuthErrorWithDomain:(NSString *)OAuthErrorDomain
50  OAuthResponse:(NSDictionary *)errorResponse
51  underlyingError:(nullable NSError *)underlyingError;
52 
60 + (NSError *)resourceServerAuthorizationErrorWithCode:(NSInteger)code
61  errorResponse:(nullable NSDictionary *)errorResponse
62  underlyingError:(nullable NSError *)underlyingError;
63 
64 
73 + (NSError *)HTTPErrorWithHTTPResponse:(NSHTTPURLResponse *)HTTPURLResponse
74  data:(nullable NSData *)data;
75 
79 + (void)raiseException:(NSString *)name;
80 
85 + (void)raiseException:(NSString *)name message:(NSString *)message;
86 
93 + (OIDErrorCodeOAuth)OAuthErrorCodeFromString:(NSString *)errorCode;
94 
103 + (BOOL)isOAuthErrorDomain:(NSString*)errorDomain;
104 
105 @end
106 
107 NS_ASSUME_NONNULL_END
OIDErrorCode
OIDErrorCode
The various error codes returned from the AppAuth library.
Definition: OIDError.h:96
OIDErrorCodeOAuth
OIDErrorCodeOAuth
Enum of all possible OAuth error codes as defined by RFC6749 @discussion Used by OIDErrorCodeOAuthAut...
Definition: OIDError.h:164
OIDErrorUtilities
Convenience methods for creating standardized NSError instances.
Definition: OIDErrorUtilities.h:27
OIDError.h
AppAuth iOS SDK.