• Validates if the authenticated user is an admin.

    Parameters

    • config: {
          authSecrets: AuthSecrets;
          authenticate: AuthenticationFunction;
          userAPI: UserDefaultAdapterAPI;
      }

      Configuration object.

      • authSecrets: AuthSecrets

        Authentication secrets used for validation.

      • authenticate: AuthenticationFunction

        Function to authenticate the user.

      • userAPI: UserDefaultAdapterAPI

        API to interact with user data.

    • logger: Logger

      Logger instance for logging.

    • context: AdapterHandlerContext

      Context of the adapter handler.

    Returns Promise<number>

    • Returns a promise that resolves to a status code.

    Throws

    • Throws an error if authentication fails or user is not an admin.

Generated using TypeDoc