AppAuth
Instance Methods | Properties | List of all members
OIDAuthorizationResponse Class Reference

Represents the response to an authorization request. More...

#import <OIDAuthorizationResponse.h>

Inheritance diagram for OIDAuthorizationResponse:

Instance Methods

(instancetype) - initWithRequest:parameters:
 Designated initializer. More...
 
(nullable OIDTokenRequest *) - tokenExchangeRequest
 Creates a token request suitable for exchanging an authorization code for an access token. More...
 
(nullable OIDTokenRequest *) - tokenExchangeRequestWithAdditionalParameters:
 Creates a token request suitable for exchanging an authorization code for an access token. More...
 

Properties

OIDAuthorizationRequestrequest
 The request which was serviced.
 
NSString * authorizationCode
 The authorization code generated by the authorization server. @discussion Set when the response_type requested includes 'code'. More...
 
NSString * state
 REQUIRED if the "state" parameter was present in the client authorization request. The exact value received from the client. More...
 
NSString * accessToken
 The access token generated by the authorization server. @discussion Set when the response_type requested includes 'token'. More...
 
NSDate * accessTokenExpirationDate
 The approximate expiration date & time of the access token. @discussion Set when the response_type requested includes 'token'. More...
 
NSString * tokenType
 Typically "Bearer" when present. Otherwise, another token_type value that the Client has negotiated with the Authorization Server. @discussion Set when the response_type requested includes 'token'. More...
 
NSString * idToken
 ID Token value associated with the authenticated session. @discussion Set when the response_type requested includes 'id_token'. More...
 
NSString * scope
 The scope of the access token. OPTIONAL, if identical to the scopes requested, otherwise, REQUIRED. More...
 
NSDictionary< NSString *, NSObject< NSCopying > * > * additionalParameters
 Additional parameters returned from the authorization server.
 

Detailed Description

Represents the response to an authorization request.

See also
https://tools.ietf.org/html/rfc6749#section-4.1.2
https://tools.ietf.org/html/rfc6749#section-5.1
http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse

Method Documentation

◆ initWithRequest:parameters:()

- (instancetype) initWithRequest: (OIDAuthorizationRequest *)  request
parameters: (NSDictionary< NSString *, NSObject< NSCopying > * > *)  NS_DESIGNATED_INITIALIZER 

Designated initializer.

Parameters
requestThe serviced request.
parametersThe decoded parameters returned from the Authorization Server.
Remarks
Known parameters are extracted from the parameters parameter and the normative properties are populated. Non-normative parameters are placed in the additionalParameters dictionary.

◆ tokenExchangeRequest()

- (nullable OIDTokenRequest *) tokenExchangeRequest

Creates a token request suitable for exchanging an authorization code for an access token.

Returns
A OIDTokenRequest suitable for exchanging an authorization code for an access token.
See also
https://tools.ietf.org/html/rfc6749#section-4.1.3

◆ tokenExchangeRequestWithAdditionalParameters:()

- (nullable OIDTokenRequest *) tokenExchangeRequestWithAdditionalParameters: (nullable NSDictionary< NSString *, NSString * > *)  additionalParameters

Creates a token request suitable for exchanging an authorization code for an access token.

Parameters
additionalParametersAdditional parameters for the token request.
Returns
A OIDTokenRequest suitable for exchanging an authorization code for an access token.
See also
https://tools.ietf.org/html/rfc6749#section-4.1.3

Property Documentation

◆ accessToken

- (NSString*) accessToken
readnonatomicassign

The access token generated by the authorization server. @discussion Set when the response_type requested includes 'token'.

Remarks
access_token
See also
http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse

◆ accessTokenExpirationDate

- (NSDate*) accessTokenExpirationDate
readnonatomicassign

The approximate expiration date & time of the access token. @discussion Set when the response_type requested includes 'token'.

Remarks
expires_in @seealso OIDAuthorizationResponse.accessToken
See also
http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse

◆ authorizationCode

- (NSString*) authorizationCode
readnonatomicassign

The authorization code generated by the authorization server. @discussion Set when the response_type requested includes 'code'.

Remarks
code

◆ idToken

- (NSString*) idToken
readnonatomicassign

ID Token value associated with the authenticated session. @discussion Set when the response_type requested includes 'id_token'.

Remarks
id_token
See also
http://openid.net/specs/openid-connect-core-1_0.html#IDToken
http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse

◆ scope

- (NSString*) scope
readnonatomicassign

The scope of the access token. OPTIONAL, if identical to the scopes requested, otherwise, REQUIRED.

Remarks
scope
See also
https://tools.ietf.org/html/rfc6749#section-5.1

◆ state

- (NSString*) state
readnonatomicassign

REQUIRED if the "state" parameter was present in the client authorization request. The exact value received from the client.

Remarks
state

◆ tokenType

- (NSString*) tokenType
readnonatomicassign

Typically "Bearer" when present. Otherwise, another token_type value that the Client has negotiated with the Authorization Server. @discussion Set when the response_type requested includes 'token'.

Remarks
token_type
See also
http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse

The documentation for this class was generated from the following file: