Skip to main content
Version: 2.1

TCognitoOpenIDConnectTokenRequest

Class in AWS.CognitoOIDC

Token request class.

Ancestors​

Properties​

ClientId​

property ClientId: string

ClientSecret​

property ClientSecret: string

Code​

property Code: string

CodeVerifier​

property CodeVerifier: string

GrantType​

property GrantType: string

Scope​

property Scope: string

RedirectUri​

property RedirectUri: string

RefreshToken​

property RefreshToken: string

Constructors​

Create​

constructor Create(const AClientId, AClientSecret, AGrantType: string);

Constructor for TCognitoOpenIDConnectTokenRequest.

Parameters

NameDescription
AClientIdSpecify the ID of the app client in your user pool.
AClientSecretSpecify the client secret for the app client.
AGrantTypeSpecify the grant type.

Methods​

ForAuthorizationCode​

class function ForAuthorizationCode( const AClientId, AClientSecret, ACode, ARedirectUri: string; const ACodeVerifier: string = ''): TCognitoOpenIDConnectTokenRequest; static;

TCognitoOpenIDConnectTokenRequest

Construct an authorization_code request.

Parameters

NameDescription
AClientIdSpecify the ID of the app client in your user pool.
AClientSecretSpecify the client secret for the app client.
ACodeSpecify an authorization code.
ARedirectUriSpecify the RedirectUri that was used to get the authorization code.
ACodeVerifierSpecify the proof key if the authorization code was requested with PKCE.

Returns

Returns a TCognitoOpenIDConnectTokenRequest instance.

ForClientCredentials​

class function ForClientCredentials( const AClientId, AClientSecret: string; const AScope: string = ''): TCognitoOpenIDConnectTokenRequest; static;

TCognitoOpenIDConnectTokenRequest

Construct a client_credentials request.

Parameters

NameDescription
AClientIdSpecify the ID of the app client in your user pool.
AClientSecretSpecify the client secret for the app client.
AScopeSpecify the scope(s).

Returns

Returns a TCognitoOpenIDConnectTokenRequest instance.

ForRefreshToken​

class function ForRefreshToken( const AClientId, AClientSecret, ARefreshToken: string): TCognitoOpenIDConnectTokenRequest; static;

TCognitoOpenIDConnectTokenRequest

Construct a refresh_token request.

Parameters

NameDescription
AClientIdSpecify the ID of the app client in your user pool.
AClientSecretSpecify the client secret for the app client.
ARefreshTokenSpecify a refresh token to regenerate a new access ID and tokens.

Returns

Returns a TCognitoOpenIDConnectTokenRequest instance.