NetIQ Mobile SDK for iOS  2.0
Access Manager iOS Framework for OAuth & OIDC
OIDAuthorizationRequest.h
Go to the documentation of this file.
1 
19 #import <Foundation/Foundation.h>
20 
21 // These files only declare string constants useful for constructing a @c OIDAuthorizationRequest,
22 // so they are imported here for convenience.
23 #import "OIDResponseTypes.h"
24 #import "OIDScopes.h"
25 
27 
28 NS_ASSUME_NONNULL_BEGIN
29 
34 
35 
40 @interface OIDAuthorizationRequest : NSObject <NSCopying, NSSecureCoding>
41 
46 @property(nonatomic, readonly) OIDServiceConfiguration *configuration;
47 
55 @property(nonatomic, readonly) NSString *responseType;
56 
61 @property(nonatomic, readonly) NSString *clientID;
62 
71 @property(nonatomic, readonly, nullable) NSString *clientSecret;
72 
78 @property(nonatomic, readonly, nullable) NSString *scope;
79 
84 @property(nonatomic, readonly, nullable) NSURL *redirectURL;
85 
95 @property(nonatomic, readonly, nullable) NSString *state;
96 
105 @property(nonatomic, readonly, nullable) NSString *codeVerifier;
106 
111 @property(nonatomic, readonly, nullable) NSString *codeChallenge;
112 
117 @property(nonatomic, readonly, nullable) NSString *codeChallengeMethod;
118 
122 @property(nonatomic, readonly, nullable) NSDictionary<NSString *, NSString *> *additionalParameters;
123 
128 - (instancetype)init NS_UNAVAILABLE;
129 
141 - (instancetype)
142  initWithConfiguration:(OIDServiceConfiguration *)configuration
143  clientId:(NSString *)clientID
144  scopes:(nullable NSArray<NSString *> *)scopes
145  redirectURL:(NSURL *)redirectURL
146  responseType:(NSString *)responseType
147  additionalParameters:(nullable NSDictionary<NSString *, NSString *> *)additionalParameters;
148 
161 - (instancetype)
162  initWithConfiguration:(OIDServiceConfiguration *)configuration
163  clientId:(NSString *)clientID
164  clientSecret:(nullable NSString *)clientSecret
165  scopes:(nullable NSArray<NSString *> *)scopes
166  redirectURL:(NSURL *)redirectURL
167  responseType:(NSString *)responseType
168  additionalParameters:(nullable NSDictionary<NSString *, NSString *> *)additionalParameters;
169 
187 - (instancetype)
188  initWithConfiguration:(OIDServiceConfiguration *)configuration
189  clientId:(NSString *)clientID
190  clientSecret:(nullable NSString *)clientSecret
191  scope:(nullable NSString *)scope
192  redirectURL:(nullable NSURL *)redirectURL
193  responseType:(NSString *)responseType
194  state:(nullable NSString *)state
195  codeVerifier:(nullable NSString *)codeVerifier
196  codeChallenge:(nullable NSString *)codeChallenge
197  codeChallengeMethod:(nullable NSString *)codeChallengeMethod
198  additionalParameters:(nullable NSDictionary<NSString *, NSString *> *)additionalParameters
199  NS_DESIGNATED_INITIALIZER;
200 
206 - (NSURL *)authorizationRequestURL;
207 
212 + (nullable NSString *)generateState;
213 
218 + (nullable NSString *)generateCodeVerifier;
219 
229 + (nullable NSString *)codeChallengeS256ForVerifier:(nullable NSString *)codeVerifier;
230 
231 @end
232 
233 NS_ASSUME_NONNULL_END
Represents the information needed to construct a OIDAuthorizationService.
Definition: OIDServiceConfiguration.h:35
nullable NSString * generateCodeVerifier()
Constructs a PKCE-compliant code verifier.
OIDServiceConfiguration * configuration
The service&#39;s configuration.
Definition: OIDAuthorizationRequest.h:46
NS_ASSUME_NONNULL_BEGIN NSString *const OIDOAuthorizationRequestCodeChallengeMethodS256
The code_challenge_method value for the S256 code challenge.
NSURL * redirectURL
The client&#39;s redirect URI.
Definition: OIDAuthorizationRequest.h:84
NSString * codeVerifier
The PKCE code verifier.
Definition: OIDAuthorizationRequest.h:105
Represents an authorization request.
Definition: OIDAuthorizationRequest.h:40
NSString * codeChallengeMethod
The method used to compute the codeChallenge.
Definition: OIDAuthorizationRequest.h:117
NSString * clientSecret
The client secret.
Definition: OIDAuthorizationRequest.h:71
AppAuth iOS SDK.
NSURL * authorizationRequestURL()
Constructs the request URI by adding the request parameters to the query component of the authorizati...
nullable NSString * generateState()
Generates an OAuth state param using a random source.
NSString * responseType
The expected response type.
Definition: OIDAuthorizationRequest.h:55
AppAuth iOS SDK.
NSDictionary< NSString *, NSString * > * additionalParameters
The client&#39;s additional authorization parameters.
Definition: OIDAuthorizationRequest.h:122
NSString * state
An opaque value used by the client to maintain state between the request and callback.
Definition: OIDAuthorizationRequest.h:95
NSString * clientID
The client identifier.
Definition: OIDAuthorizationRequest.h:61
NSString * scope
The value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings...
Definition: OIDAuthorizationRequest.h:78
NSString * codeChallenge
The PKCE code challenge, derived from codeVerifier.
Definition: OIDAuthorizationRequest.h:111