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

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

#import <OIDTokenResponse.h>

Inheritance diagram for OIDTokenResponse:

Instance Methods

(instancetype) - initWithRequest:parameters:
 Designated initializer. More...
 

Properties

OIDTokenRequestrequest
 The request which was serviced.
 
NSString * accessToken
 The access token generated by the authorization server. More...
 
NSDate * accessTokenExpirationDate
 The approximate expiration date & time of the access token. More...
 
NSString * tokenType
 Typically "Bearer" when present. Otherwise, another token_type value that the Client has negotiated with the Authorization Server. More...
 
NSString * idToken
 ID Token value associated with the authenticated session. Always present for the authorization code grant exchange when OpenID Connect is used, optional for responses to access token refresh requests. Note that AppAuth does NOT verify the JWT signature. Users of AppAuth are encouraged to verifying the JWT signature using the validation library of their choosing. More...
 
NSString * refreshToken
 The refresh token, which can be used to obtain new access tokens using the same authorization grant. 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 token server.
 

Detailed Description

Represents the response to an token request.

See also
https://tools.ietf.org/html/rfc6749#section-3.2
https://tools.ietf.org/html/rfc6749#section-4.1.3

Method Documentation

◆ initWithRequest:parameters:()

- (instancetype) initWithRequest: (OIDTokenRequest *)  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.

Property Documentation

◆ accessToken

- (NSString*) accessToken
readnonatomicassign

The access token generated by the authorization server.

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

◆ accessTokenExpirationDate

- (NSDate*) accessTokenExpirationDate
readnonatomicassign

The approximate expiration date & time of the access token.

Remarks
expires_in @seealso OIDTokenResponse.accessToken
See also
https://tools.ietf.org/html/rfc6749#section-4.1.4
https://tools.ietf.org/html/rfc6749#section-5.1

◆ idToken

- (NSString*) idToken
readnonatomicassign

ID Token value associated with the authenticated session. Always present for the authorization code grant exchange when OpenID Connect is used, optional for responses to access token refresh requests. Note that AppAuth does NOT verify the JWT signature. Users of AppAuth are encouraged to verifying the JWT signature using the validation library of their choosing.

Remarks
id_token
See also
http://openid.net/specs/openid-connect-core-1_0.html#TokenResponse
http://openid.net/specs/openid-connect-core-1_0.html#RefreshTokenResponse
http://openid.net/specs/openid-connect-core-1_0.html#IDToken
https://jwt.io @discussion OIDIDToken can be used to parse the ID Token and extract the claims. As noted, this class does not verify the JWT signature.

◆ refreshToken

- (NSString*) refreshToken
readnonatomicassign

The refresh token, which can be used to obtain new access tokens using the same authorization grant.

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

◆ 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

◆ tokenType

- (NSString*) tokenType
readnonatomicassign

Typically "Bearer" when present. Otherwise, another token_type value that the Client has negotiated with the Authorization Server.

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

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