NetIQ Mobile SDK for iOS  2.0
Access Manager iOS Framework for OAuth & OIDC
OIDTokenRequest.h
Go to the documentation of this file.
1 
19 #import <Foundation/Foundation.h>
20 
21 // This file only declares string constants useful for constructing a @c OIDTokenRequest, so it is
22 // imported here for convenience.
23 #import "OIDGrantTypes.h"
24 
27 
28 NS_ASSUME_NONNULL_BEGIN
29 
34 @interface OIDTokenRequest : NSObject <NSCopying, NSSecureCoding>
35 
40 @property(nonatomic, readonly) OIDServiceConfiguration *configuration;
41 
48 @property(nonatomic, readonly) NSString *grantType;
49 
54 @property(nonatomic, readonly, nullable) NSString *authorizationCode;
55 
60 @property(nonatomic, readonly) NSURL *redirectURL;
61 
66 @property(nonatomic, readonly) NSString *clientID;
67 
72 @property(nonatomic, readonly, nullable) NSString *clientSecret;
73 
79 @property(nonatomic, readonly, nullable) NSString *scope;
80 
86 @property(nonatomic, readonly, nullable) NSString *refreshToken;
87 
92 @property(nonatomic, readonly, nullable) NSString *codeVerifier;
93 
96 @property(nonatomic, readonly, nullable) NSDictionary<NSString *, NSString *> *additionalParameters;
97 
102 - (instancetype)init NS_UNAVAILABLE;
103 
115 - (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration
116  grantType:(NSString *)grantType
117  authorizationCode:(nullable NSString *)code
118  redirectURL:(NSURL *)redirectURL
119  clientID:(NSString *)clientID
120  clientSecret:(nullable NSString *)clientSecret
121  scopes:(nullable NSArray<NSString *> *)scopes
122  refreshToken:(nullable NSString *)refreshToken
123  codeVerifier:(nullable NSString *)codeVerifier
124  additionalParameters:(nullable NSDictionary<NSString *, NSString *> *)additionalParameters;
125 
139 - (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration
140  grantType:(NSString *)grantType
141  authorizationCode:(nullable NSString *)code
142  redirectURL:(NSURL *)redirectURL
143  clientID:(NSString *)clientID
144  clientSecret:(nullable NSString *)clientSecret
145  scope:(nullable NSString *)scope
146  refreshToken:(nullable NSString *)refreshToken
147  codeVerifier:(nullable NSString *)codeVerifier
148  additionalParameters:(nullable NSDictionary<NSString *, NSString *> *)additionalParameters
149  NS_DESIGNATED_INITIALIZER;
150 
154 - (NSURLRequest *)URLRequest;
155 
156 @end
157 
158 NS_ASSUME_NONNULL_END
NSDictionary< NSString *, NSString * > * additionalParameters
The client&#39;s additional token request parameters.
Definition: OIDTokenRequest.h:96
Represents the information needed to construct a OIDAuthorizationService.
Definition: OIDServiceConfiguration.h:35
NSString * grantType
The type of token being sent to the token endpoint, i.e. "authorization_code" for the authorization c...
Definition: OIDTokenRequest.h:48
NSString * scope
The value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings...
Definition: OIDTokenRequest.h:79
Represents the response to an authorization request.
Definition: OIDAuthorizationResponse.h:31
NSString * authorizationCode
The authorization code received from the authorization server.
Definition: OIDTokenRequest.h:54
OIDServiceConfiguration * configuration
The service&#39;s configuration.
Definition: OIDTokenRequest.h:40
NSString * clientSecret
The client secret.
Definition: OIDTokenRequest.h:72
NSString * refreshToken
The refresh token, which can be used to obtain new access tokens using the same authorization grant...
Definition: OIDTokenRequest.h:86
NSURL * redirectURL
The client&#39;s redirect URI.
Definition: OIDTokenRequest.h:60
Represents a token request.
Definition: OIDTokenRequest.h:34
AppAuth iOS SDK.
NSString * clientID
The client identifier.
Definition: OIDTokenRequest.h:66
NSString * codeVerifier
The PKCE code verifier used to redeem the authorization code.
Definition: OIDTokenRequest.h:92
NSURLRequest * URLRequest()
Constructs an NSURLRequest representing the token request.