AppAuth
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, nullable) 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 
117 - (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration
118  grantType:(NSString *)grantType
119  authorizationCode:(nullable NSString *)code
120  redirectURL:(nullable NSURL *)redirectURL
121  clientID:(NSString *)clientID
122  clientSecret:(nullable NSString *)clientSecret
123  scopes:(nullable NSArray<NSString *> *)scopes
124  refreshToken:(nullable NSString *)refreshToken
125  codeVerifier:(nullable NSString *)codeVerifier
126  additionalParameters:(nullable NSDictionary<NSString *, NSString *> *)additionalParameters;
127 
143 - (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration
144  grantType:(NSString *)grantType
145  authorizationCode:(nullable NSString *)code
146  redirectURL:(nullable NSURL *)redirectURL
147  clientID:(NSString *)clientID
148  clientSecret:(nullable NSString *)clientSecret
149  scope:(nullable NSString *)scope
150  refreshToken:(nullable NSString *)refreshToken
151  codeVerifier:(nullable NSString *)codeVerifier
152  additionalParameters:(nullable NSDictionary<NSString *, NSString *> *)additionalParameters
153  NS_DESIGNATED_INITIALIZER;
154 
158 - (NSURLRequest *)URLRequest;
159 
160 @end
161 
162 NS_ASSUME_NONNULL_END
OIDServiceConfiguration
Represents the information needed to construct a OIDAuthorizationService.
Definition: OIDServiceConfiguration.h:35
OIDTokenRequest::authorizationCode
NSString * authorizationCode
The authorization code received from the authorization server.
Definition: OIDTokenRequest.h:54
OIDAuthorizationResponse
Represents the response to an authorization request.
Definition: OIDAuthorizationResponse.h:31
OIDTokenRequest::scope
NSString * scope
The value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings.
Definition: OIDTokenRequest.h:79
OIDTokenRequest::clientSecret
NSString * clientSecret
The client secret.
Definition: OIDTokenRequest.h:72
OIDTokenRequest::redirectURL
NSURL * redirectURL
The client's redirect URI.
Definition: OIDTokenRequest.h:60
OIDTokenRequest::clientID
NSString * clientID
The client identifier.
Definition: OIDTokenRequest.h:66
OIDGrantTypes.h
AppAuth iOS SDK.
-[OIDTokenRequest URLRequest]
NSURLRequest * URLRequest()
Constructs an NSURLRequest representing the token request.
OIDTokenRequest::configuration
OIDServiceConfiguration * configuration
The service's configuration.
Definition: OIDTokenRequest.h:40
OIDTokenRequest
Represents a token request.
Definition: OIDTokenRequest.h:34
OIDTokenRequest::grantType
NSString * grantType
The type of token being sent to the token endpoint, i.e. "authorization_code" for the authorization c...
Definition: OIDTokenRequest.h:48
OIDTokenRequest::refreshToken
NSString * refreshToken
The refresh token, which can be used to obtain new access tokens using the same authorization grant.
Definition: OIDTokenRequest.h:86
OIDTokenRequest::additionalParameters
NSDictionary< NSString *, NSString * > * additionalParameters
The client's additional token request parameters.
Definition: OIDTokenRequest.h:96
OIDTokenRequest::codeVerifier
NSString * codeVerifier
The PKCE code verifier used to redeem the authorization code.
Definition: OIDTokenRequest.h:92