Skip to main content

TCognitoIdentityProviderSecretHashEncoder

Class in AWS.CognitoIdentityProvider

Encoder utility for generating "secret hash" values used in authentication requests made to Cognito User Pools.

Ancestors

  • TObject

Constructors

Create

constructor Create(const AClientId, AClientSecret: string);

Constructor for TCognitoIdentityProviderSecretHashEncoder.

Parameters

NameDescription
AClientIdSpecify the app client ID.
AClientSecretSpecify the secret for the client ID.

Methods

Encode

class function Encode(const AClientId, AClientSecret, AUsername: string): string; overload; static;

Encode a secret hash for a given username for the configured client.

Parameters

NameDescription
AClientIdSpecify the app client ID.
AClientSecretSpecify the secret for the client ID.
AUsernameSpecify the username.

Returns

Returns an Base64 encoded string value of the calculated hash.


function Encode(const AUsername: string): string; overload;

Encode a secret hash for a given username for the configured client.

Parameters

NameDescription
AUsernameSpecify the username.

Returns

Returns an Base64 encoded string value of the calculated hash.