Interface: AuthStrategy
Defined in: src/auth/auth-types.ts:81
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
const strategy: AuthStrategy = createOnPremStrategy();
await strategy.authenticate(page, config);
const loggedIn = await strategy.isAuthenticated(page);
Properties
name
readonlyname:string
Defined in: src/auth/auth-types.ts:83
Human-readable strategy name (e.g., 'onprem', 'cloud-saml').
Methods
authenticate()
authenticate(
page,config):Promise<void>
Defined in: src/auth/auth-types.ts:96
Authenticate against the SAP system.
Parameters
page
AuthPage
Playwright page for browser interactions.
config
Readonly<SAPAuthConfig>
SAP authentication configuration.
Returns
Promise<void>
Example
await strategy.authenticate(page, config);
isAuthenticated()
isAuthenticated(
page):Promise<boolean>
Defined in: src/auth/auth-types.ts:109
Check if the current page session is authenticated.
Parameters
page
AuthPage
Playwright page to check.
Returns
Promise<boolean>
true if authenticated (shell header visible).
Example
const isAuth = await strategy.isAuthenticated(page);