Alokai

MiddlewareOAuthConfig

Settings for requests sent to authorization server.

interface MiddlewareOAuthConfig {
	clientId: string;
	clientSecret: string;
	cookieOptions?: MiddlewareCookieOptions;
	pkceSupported?: boolean;
	redirectUri?: string;
	tokenEndpoint: string;
	tokenRetryIntervalInSeconds?: false | number;
	tokenRevokeEndpoint: string;
	uri: string;
}

Properties

NameRequiredTypeDescription
clientIdRequiredstringClient Id of OAuth Client.
clientSecretRequiredstringClient Secret of OAuth Client.
cookieOptionsOptionalMiddlewareCookieOptionsObject allowing to overwrite options of auth cookies (e.g. vsf-sap-token customer token cookie).
pkceSupportedOptionalbooleanOptional override for the customer OAuth flow. When omitted, middleware auto-detects PKCE support during init. When true, CustomerTokenService uses Authorization Code + PKCE flow instead of ROPC for customer login.
redirectUriOptionalstringOptional redirect URI for the PKCE Authorization Code flow. Only required if the SAP Commerce instance requires a redirect_uri parameter.
tokenEndpointRequiredstringEndpoint for retrieving and refreshing customer/application tokens (e.g. /oauth/token).
tokenRetryIntervalInSecondsOptionalfalse | numberThe number of seconds to wait before retrying to fetch an application token when the SAPCC authorization server is unavailable. Defaults to 30 seconds. Setting it to false disables the retry mechanism.
tokenRevokeEndpointRequiredstringEndpoint for revoking customers tokens (e.g. /oauth/revoke).
uriRequiredstringFull OAuth server uri (e.g. https://<your-sap-api>/authorizationserver/).

Referenced Types

On this page