import { UserProfile } from '@loopback/security'; export interface AuthConfig { } export interface ClientApplicationRegistration { id: string; name: string; } /** * A special profile for anonymous users (unauthenticated) */ export declare const ANONYMOUS_USER: UserProfile; /** * Check if the given user profile is anonymous * @param user - User profile * @returns */ export declare function isAnonymous(user: UserProfile): boolean; /** * Create a special user profile for a client application * @param clientApp - OAuth2 client application * @returns */ export declare function createServiceAccount(clientApp: ClientApplicationRegistration): UserProfile; /** * Check if the given user profile is a service account * @param user - User profile * @returns */ export declare function isServiceAccount(user: UserProfile): boolean; /** * A special service account with admin permissions */ export declare const ADMIN_ACCOUNT: UserProfile; /** * Check if the user is an admin account * @param user - User profile * @returns */ export declare function isAdmin(user: UserProfile): boolean; export declare function isCustomerSupport(user: UserProfile): boolean; export declare const API_KEY_AUTHENTICATION = "api-key-auth"; export declare const AE_TOKEN_AUTHENTICATION = "ae-token-auth"; export declare const ETHEREUM_AUTHENTICATION = "ethereum-auth"; export declare const ANONYMOUS_AUTHENTICATION = "anonymous-auth"; export declare const CLIENT_APPLICATION_AUTHENTICATION = "client-application-auth"; export declare const OAUTH2_AUTHENTICATION = "oauth2-auth"; export declare const DISCORD_AUTHENTICATION = "discord-auth"; /** * A short-cut decorator to mark classes/methods to be authenticated */ export declare function auth(): (target: any, method?: string | undefined, methodDescriptor?: TypedPropertyDescriptor | undefined) => any; /** * Composition of authentication decorators * @param decorators * @returns */ export declare function composeAuthDecorators(...decorators: ReturnType[]): (target: any, method?: string | undefined, methodDescriptor?: TypedPropertyDescriptor | undefined) => void; /** * Get the identity provider of the user profile behind an access token. The * identity provider is used to login a user * @param user - User profile * @returns */ export declare function getIdentityProvider(user: UserProfile): any;