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

Represents a token request. More...

#import <OIDTokenRequest.h>

Inheritance diagram for OIDTokenRequest:

Instance Methods

(instancetype) - initWithConfiguration:grantType:authorizationCode:redirectURL:clientID:clientSecret:scopes:refreshToken:codeVerifier:additionalParameters:
 
(instancetype) - initWithConfiguration:grantType:authorizationCode:redirectURL:clientID:clientSecret:scope:refreshToken:codeVerifier:additionalParameters:
 Designated initializer. More...
 
(NSURLRequest *) - URLRequest
 Constructs an NSURLRequest representing the token request. More...
 

Properties

OIDServiceConfigurationconfiguration
 The service's configuration. More...
 
NSString * grantType
 The type of token being sent to the token endpoint, i.e. "authorization_code" for the authorization code exchange, or "refresh_token" for an access token refresh request. More...
 
NSString * authorizationCode
 The authorization code received from the authorization server. More...
 
NSURL * redirectURL
 The client's redirect URI. More...
 
NSString * clientID
 The client identifier. More...
 
NSString * clientSecret
 The client secret. More...
 
NSString * scope
 The value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings. More...
 
NSString * refreshToken
 The refresh token, which can be used to obtain new access tokens using the same authorization grant. More...
 
NSString * codeVerifier
 The PKCE code verifier used to redeem the authorization code. More...
 
NSDictionary< NSString *, NSString * > * additionalParameters
 The client's additional token request parameters.
 

Detailed Description

Represents a 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

◆ initWithConfiguration:grantType:authorizationCode:redirectURL:clientID:clientSecret:scope:refreshToken:codeVerifier:additionalParameters:()

- (instancetype) initWithConfiguration: (OIDServiceConfiguration *)  configuration
grantType: (NSString *)  grantType
authorizationCode: (nullable NSString *)  code
redirectURL: (nullable NSURL *)  redirectURL
clientID: (NSString *)  clientID
clientSecret: (nullable NSString *)  clientSecret
scope: (nullable NSString *)  scope
refreshToken: (nullable NSString *)  refreshToken
codeVerifier: (nullable NSString *)  codeVerifier
additionalParameters: (nullable NSDictionary< NSString *, NSString * > *)  NS_DESIGNATED_INITIALIZER 

Designated initializer.

Parameters
configurationThe service's configuration.
grantTypethe type of token being sent to the token endpoint, i.e. "authorization_code" for the authorization code exchange, or "refresh_token" for an access token refresh request.
See also
OIDGrantTypes.h
Parameters
codeThe authorization code received from the authorization server.
redirectURLThe client's redirect URI.
clientIDThe client identifier.
clientSecretThe client secret.
scopeThe value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings.
refreshTokenThe refresh token.
codeVerifierThe PKCE code verifier.
additionalParametersThe client's additional token request parameters.

◆ initWithConfiguration:grantType:authorizationCode:redirectURL:clientID:clientSecret:scopes:refreshToken:codeVerifier:additionalParameters:()

- (instancetype) initWithConfiguration: (OIDServiceConfiguration *)  configuration
grantType: (NSString *)  grantType
authorizationCode: (nullable NSString *)  code
redirectURL: (nullable NSURL *)  redirectURL
clientID: (NSString *)  clientID
clientSecret: (nullable NSString *)  clientSecret
scopes: (nullable NSArray< NSString * > *)  scopes
refreshToken: (nullable NSString *)  refreshToken
codeVerifier: (nullable NSString *)  codeVerifier
additionalParameters: (nullable NSDictionary< NSString *, NSString * > *)  additionalParameters 
Parameters
configurationThe service's configuration.
grantTypethe type of token being sent to the token endpoint, i.e. "authorization_code" for the authorization code exchange, or "refresh_token" for an access token refresh request.
See also
OIDGrantTypes.h
Parameters
codeThe authorization code received from the authorization server.
redirectURLThe client's redirect URI.
clientIDThe client identifier.
clientSecretThe client secret.
scopesAn array of scopes to combine into a single scope string per the OAuth2 spec.
refreshTokenThe refresh token.
codeVerifierThe PKCE code verifier.
additionalParametersThe client's additional token request parameters.

◆ URLRequest()

- (NSURLRequest *) URLRequest

Constructs an NSURLRequest representing the token request.

Returns
An NSURLRequest representing the token request.

Property Documentation

◆ authorizationCode

- (NSString*) authorizationCode
readnonatomicassign

The authorization code received from the authorization server.

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

◆ clientID

- (NSString*) clientID
readnonatomicassign

The client identifier.

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

◆ clientSecret

- (NSString*) clientSecret
readnonatomicassign

The client secret.

Remarks
client_secret
See also
https://tools.ietf.org/html/rfc6749#section-2.3.1

◆ codeVerifier

- (NSString*) codeVerifier
readnonatomicassign

The PKCE code verifier used to redeem the authorization code.

Remarks
code_verifier
See also
https://tools.ietf.org/html/rfc7636#section-4.3

◆ configuration

- (OIDServiceConfiguration*) configuration
readnonatomicassign

The service's configuration.

Remarks
This configuration specifies how to connect to a particular OAuth provider. Configurations may be created manually, or via an OpenID Connect Discovery Document.

◆ grantType

- (NSString*) grantType
readnonatomicassign

The type of token being sent to the token endpoint, i.e. "authorization_code" for the authorization code exchange, or "refresh_token" for an access token refresh request.

Remarks
grant_type
See also
https://tools.ietf.org/html/rfc6749#section-4.1.3
https://www.google.com/url?sa=D&q=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc6749%23section-6

◆ redirectURL

- (NSURL*) redirectURL
readnonatomicassign

The client's redirect URI.

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

◆ 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 value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings.

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

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