Praman — AI-First SAP UI5 Test Automation Platform - v1.0.1
    Preparing search index...

    Interface AuthStrategy

    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);
    interface AuthStrategy {
        name: string;
        authenticate(
            page: AuthPage,
            config: Readonly<SAPAuthConfig>,
        ): Promise<void>;
        isAuthenticated(page: AuthPage): Promise<boolean>;
    }
    Index

    Properties

    name: string

    Human-readable strategy name (e.g., 'onprem', 'cloud-saml').

    Methods

    • Authenticate against the SAP system.

      Parameters

      • page: AuthPage

        Playwright page for browser interactions.

      • config: Readonly<SAPAuthConfig>

        SAP authentication configuration.

      Returns Promise<void>

      await strategy.authenticate(page, config);
      
    • Check if the current page session is authenticated.

      Parameters

      • page: AuthPage

        Playwright page to check.

      Returns Promise<boolean>

      true if authenticated (shell header visible).

      const isAuth = await strategy.isAuthenticated(page);