AutoBE
    Preparing search index...

    Interface AutoBeTestAuthorizeFunction

    Interface defining authorization functions used in test code.

    Defines functions that perform authentication processes such as login, signup, and token refresh for each actor (user role) during E2E test execution. This interface is used by AutoBE to represent the structure and content of authorization functions when generating test code.

    Michael

    interface AutoBeTestAuthorizeFunction {
        actor: string;
        authType: string;
        content: string;
        endpoint: IEndpoint;
        location: string;
        name: string;
        type: "authorize";
    }

    Hierarchy

    • AutoBeTestFunctionBase<"authorize">
      • AutoBeTestAuthorizeFunction
    Index

    Properties

    actor: string

    Actor name representing the user role performing authentication.

    Examples: "admin", "user", "guest", etc. Each actor has different permissions and access scopes, requiring separate authorization functions.

    authType: string

    Authentication type - one of "login" | "join" | "refresh" | "management".

    • Login: Authenticate existing user
    • Join: Register new user
    • Refresh: Renew expired token
    • Management: Other auth operations (logout, password reset/change, verify, 2fa, oauth, sessions, me)
    content: string

    The complete source code content of the test function. Contains the full implementation including function signature and body.

    endpoint: IEndpoint

    OpenAPI endpoint specification that this authorization function corresponds to.

    Used to determine which endpoint this authorization function was generated from. For example, a login authorization function is generated from POST /auth/login endpoint.

    location: string

    The file system location where this test function will be written. Should be an absolute or relative path to the target test file.

    name: string

    The name identifier of the function. Used to reference the function within the test suite.

    type: "authorize"

    Discriminator field that identifies the specific type of test function. Used for discriminated union pattern to distinguish between different test function types.