Optionaloptions: SudoUserOptionsGetter to retrieve the SudoKeyManager
Clears cached authentication tokens.
De-registers the user associated with this client. The user must be signed in.
Returns the access token cached from the last sign-in.
access token.
Returns the ID token cached from the last sign-in.
ID token.
Retrieves the latest ID token. This is to be used by the AWS AppSync client.
the latest ID token
Returns the refresh token cached from the last sign-in.
refresh token.
Returns the refresh token expiry cached from the last sign-in.
refresh token expiry.
Returns the subject of the user associated with this client. Note: This is an internal method used by other Sudo platform SDKs.
user subject.
Returns the ID and access token expiry cached from the last sign-in.
token expiry.
Returns the specified claim associated with the user's identity.
claim name.
Returns the user name associated with this client. The username maybe needed to contact the support team when diagnosing an issue related to a specific user.
user name.
Signs out the user from all devices.
Indicates whether or not this client is registered with Sudo Platform backend.
true if the client is registered.
Indicates whether or not this client is signed in with Sudo Platform backend. The client is considered signed in if it cached valid ID, access and refresh tokens.
true if the client is signed in.
Presents the sign in UI for federated sign in using an external identity provider.
Presents the Cognito hosted UI signout endpoint. When the endpoint is invoked, the hosted web app's cookies will be invalidated, but the user is not logged out of Cognito.
Processes tokens from federated sign in returned to the specified URL. The tokens are passed to the web app via a redirect URL.
callback URL containing the tokens.
Successful authentication result AuthenticationTokens.
Refresh the access and ID tokens using the refresh token.
refresh token used to refresh the access and ID tokens.
Successful authentication result AuthenticationTokens containing refreshed tokens
Registers this client against the backend with an external authentication provider. The caller must implement AuthenticationProvider protocol to return the appropriate authentication token required to authorize the registration request.
authentication provider that provides the authentication token.
OptionalregistrationId: stringregistration ID to uniquely identify this registration request.
user ID of the newly created user
Resets internal state and clears any cached data.
Removes all data owned by the signed-in user in Sudo Platform Services without deregistering the user. Should only be used in tests.
Provide a custom authentication store. This is mainly used for unit testing (optional).
Provide a custom auth UI. This is mainly used for unit testing (optional).
Provide a custom identity provider. This is mainly used for unit testing (optional).
Provide a custom function to open the sign in url. This is mainly used for unit testing (optional).
Sets the user name associated with this client.
user name.
Sign into the backend using an external authentication provider. Caller must implement AuthenticationProvider interface to return the appropriate authentication token associated with the external identity registered with registerWithAuthenticationProvider.
authentication provider that provides the authentication token.
authentication tokens associated with the successful sign in.
Sign into the backend using a private key. The client must have created a private/public key pair via the registerWithAuthenticationProvider method.
authentication tokens associated with the successful sign in.
Signs out the user from this device.
Interface encapsulating a library of functions for calling Sudo Platform identity service, handling federated sign in, managing keys and performing cryptographic operations.