AppAuth
OIDAuthorizationResponse.h
Go to the documentation of this file.
1 
19 #import <Foundation/Foundation.h>
20 
22 @class OIDTokenRequest;
23 
24 NS_ASSUME_NONNULL_BEGIN
25 
31 @interface OIDAuthorizationResponse : NSObject <NSCopying, NSSecureCoding>
32 
35 @property(nonatomic, readonly) OIDAuthorizationRequest *request;
36 
41 @property(nonatomic, readonly, nullable) NSString *authorizationCode;
42 
47 @property(nonatomic, readonly, nullable) NSString *state;
48 
54 @property(nonatomic, readonly, nullable) NSString *accessToken;
55 
62 @property(nonatomic, readonly, nullable) NSDate *accessTokenExpirationDate;
63 
70 @property(nonatomic, readonly, nullable) NSString *tokenType;
71 
78 @property(nonatomic, readonly, nullable) NSString *idToken;
79 
85 @property(nonatomic, readonly, nullable) NSString *scope;
86 
89 @property(nonatomic, readonly, nullable)
90  NSDictionary<NSString *, NSObject<NSCopying> *> *additionalParameters;
91 
95 - (instancetype)init NS_UNAVAILABLE;
96 
104 - (instancetype)initWithRequest:(OIDAuthorizationRequest *)request
105  parameters:(NSDictionary<NSString *, NSObject<NSCopying> *> *)parameters
106  NS_DESIGNATED_INITIALIZER;
107 
115 
123 - (nullable OIDTokenRequest *)tokenExchangeRequestWithAdditionalParameters:
124  (nullable NSDictionary<NSString *, NSString *> *)additionalParameters;
125 
126 @end
127 
128 NS_ASSUME_NONNULL_END
OIDAuthorizationResponse::additionalParameters
NSDictionary< NSString *, NSObject< NSCopying > * > * additionalParameters
Additional parameters returned from the authorization server.
Definition: OIDAuthorizationResponse.h:90
OIDAuthorizationResponse
Represents the response to an authorization request.
Definition: OIDAuthorizationResponse.h:31
OIDAuthorizationResponse::accessTokenExpirationDate
NSDate * accessTokenExpirationDate
The approximate expiration date & time of the access token. @discussion Set when the response_type re...
Definition: OIDAuthorizationResponse.h:62
OIDAuthorizationRequest
Represents an authorization request.
Definition: OIDAuthorizationRequest.h:41
OIDAuthorizationResponse::authorizationCode
NSString * authorizationCode
The authorization code generated by the authorization server. @discussion Set when the response_type ...
Definition: OIDAuthorizationResponse.h:41
OIDAuthorizationResponse::state
NSString * state
REQUIRED if the "state" parameter was present in the client authorization request....
Definition: OIDAuthorizationResponse.h:47
OIDAuthorizationResponse::scope
NSString * scope
The scope of the access token. OPTIONAL, if identical to the scopes requested, otherwise,...
Definition: OIDAuthorizationResponse.h:85
-[OIDAuthorizationResponse tokenExchangeRequest]
nullable OIDTokenRequest * tokenExchangeRequest()
Creates a token request suitable for exchanging an authorization code for an access token.
OIDAuthorizationResponse::request
OIDAuthorizationRequest * request
The request which was serviced.
Definition: OIDAuthorizationResponse.h:35
OIDTokenRequest
Represents a token request.
Definition: OIDTokenRequest.h:34
OIDAuthorizationResponse::idToken
NSString * idToken
ID Token value associated with the authenticated session. @discussion Set when the response_type requ...
Definition: OIDAuthorizationResponse.h:78
OIDAuthorizationResponse::tokenType
NSString * tokenType
Typically "Bearer" when present. Otherwise, another token_type value that the Client has negotiated w...
Definition: OIDAuthorizationResponse.h:70
OIDAuthorizationResponse::accessToken
NSString * accessToken
The access token generated by the authorization server. @discussion Set when the response_type reques...
Definition: OIDAuthorizationResponse.h:54