NetIQ Mobile SDK for iOS  2.0
Access Manager iOS Framework for OAuth & OIDC
OIDAuthorizationService.h
Go to the documentation of this file.
1 
19 #import <Foundation/Foundation.h>
20 
21 @class OIDAuthorization;
27 @class OIDTokenRequest;
28 @class OIDTokenResponse;
29 @protocol OIDAuthorizationFlowSession;
31 
32 NS_ASSUME_NONNULL_BEGIN
33 
39 typedef void (^OIDDiscoveryCallback)(OIDServiceConfiguration *_Nullable configuration,
40  NSError *_Nullable error);
41 
47 typedef void (^OIDAuthorizationCallback)(OIDAuthorizationResponse *_Nullable authorizationResponse,
48  NSError *_Nullable error);
49 
55 typedef void (^OIDTokenCallback)(OIDTokenResponse *_Nullable tokenResponse,
56  NSError *_Nullable error);
57 
61 typedef NSDictionary<NSString *, NSString *> *_Nullable OIDTokenEndpointParameters;
62 
68 typedef void (^OIDRegistrationCompletion)(OIDRegistrationResponse *_Nullable registrationResponse,
69  NSError *_Nullable error);
70 
74 @interface OIDAuthorizationService : NSObject
75 
82 @property(nonatomic, readonly) OIDServiceConfiguration *configuration;
83 
87 - (instancetype)init NS_UNAVAILABLE;
88 
96 + (void)discoverServiceConfigurationForIssuer:(NSURL *)issuerURL
97  completion:(OIDDiscoveryCallback)completion;
98 
99 
107 + (void)discoverServiceConfigurationForDiscoveryURL:(NSURL *)discoveryURL
108  completion:(OIDDiscoveryCallback)completion;
109 
119 + (id<OIDAuthorizationFlowSession>)
120  presentAuthorizationRequest:(OIDAuthorizationRequest *)request
121  UICoordinator:(id<OIDAuthorizationUICoordinator>)UICoordinator
122  callback:(OIDAuthorizationCallback)callback;
123 
128 + (void)performTokenRequest:(OIDTokenRequest *)request callback:(OIDTokenCallback)callback;
129 
134 + (void)performRegistrationRequest:(OIDRegistrationRequest *)request
135  completion:(OIDRegistrationCompletion)completion;
136 
137 @end
138 
141 @protocol OIDAuthorizationFlowSession <NSObject>
142 
150 - (void)cancel;
151 
162 - (BOOL)resumeAuthorizationFlowWithURL:(NSURL *)URL;
163 
169 - (void)failAuthorizationFlowWithError:(NSError *)error;
170 
171 @end
172 
173 NS_ASSUME_NONNULL_END
Represents the information needed to construct a OIDAuthorizationService.
Definition: OIDServiceConfiguration.h:35
void(^ OIDRegistrationCompletion)(OIDRegistrationResponse *_Nullable registrationResponse, NSError *_Nullable error)
Represents the type of block used as a callback for various methods of OIDAuthorizationService.
Definition: OIDAuthorizationService.h:68
void(^ OIDTokenCallback)(OIDTokenResponse *_Nullable tokenResponse, NSError *_Nullable error)
Represents the type of block used as a callback for various methods of OIDAuthorizationService.
Definition: OIDAuthorizationService.h:55
An authorization UI coordinator that presents an authorization request. Clients may provide custom im...
Definition: OIDAuthorizationUICoordinator.h:30
Represents the response to an authorization request.
Definition: OIDAuthorizationResponse.h:31
Represents an authorization request.
Definition: OIDAuthorizationRequest.h:40
NS_ASSUME_NONNULL_BEGIN typedef void(^ OIDDiscoveryCallback)(OIDServiceConfiguration *_Nullable configuration, NSError *_Nullable error)
Represents the type of block used as a callback for creating a service configuration from a remote Op...
void(^ OIDAuthorizationCallback)(OIDAuthorizationResponse *_Nullable authorizationResponse, NSError *_Nullable error)
Represents the type of block used as a callback for various methods of OIDAuthorizationService.
Definition: OIDAuthorizationService.h:47
Represents a registration response.
Definition: OIDRegistrationResponse.h:53
Represents a token request.
Definition: OIDTokenRequest.h:34
Represents the response to an token request.
Definition: OIDTokenResponse.h:29
Performs various OAuth and OpenID Connect related calls via the user agent or .
Definition: OIDAuthorizationService.h:74
NSDictionary< NSString *, NSString * > *_Nullable OIDTokenEndpointParameters
Represents the type of dictionary used to specify additional querystring parameters when making autho...
Definition: OIDAuthorizationService.h:61
OIDServiceConfiguration * configuration
The service&#39;s configuration.
Definition: OIDAuthorizationService.h:82
Represents a registration request.
Definition: OIDRegistrationRequest.h:29