Authentication strategy interface.
All authentication strategies (onprem, cloud-saml, office365, api, certificate, multi-tenant) implement this interface to provide a consistent authentication API.
const strategy: AuthStrategy = createOnPremStrategy();await strategy.authenticate(page, config);const loggedIn = await strategy.isAuthenticated(page); Copy
const strategy: AuthStrategy = createOnPremStrategy();await strategy.authenticate(page, config);const loggedIn = await strategy.isAuthenticated(page);
Readonly
Human-readable strategy name (e.g., 'onprem', 'cloud-saml').
Authenticate against the SAP system.
Playwright page for browser interactions.
SAP authentication configuration.
await strategy.authenticate(page, config); Copy
await strategy.authenticate(page, config);
Check if the current page session is authenticated.
Playwright page to check.
true if authenticated (shell header visible).
true
const isAuth = await strategy.isAuthenticated(page); Copy
const isAuth = await strategy.isAuthenticated(page);
Authentication strategy interface.
Remarks
All authentication strategies (onprem, cloud-saml, office365, api, certificate, multi-tenant) implement this interface to provide a consistent authentication API.
Example