loopback4-authentication
Version:
A loopback-next extension for authentication feature. Various Oauth strategies supported by this package.
23 lines (22 loc) • 1.35 kB
TypeScript
import { BindingKey, Constructor } from '@loopback/context';
import { MetadataAccessor } from '@loopback/metadata';
import { Strategy } from 'passport';
import { AuthenticateFn, AuthenticationConfig, AuthenticationMetadata, EntityWithIdentifier, IAuthClient, IAuthUser } from './types';
export * from './strategies/keys';
/**
* Binding keys used by this component.
*/
export declare namespace AuthenticationBindings {
const USER_STRATEGY: BindingKey<Strategy | undefined>;
const CLIENT_STRATEGY: BindingKey<Strategy | undefined>;
const USER_AUTH_ACTION: BindingKey<AuthenticateFn<IAuthUser | undefined>>;
const CLIENT_AUTH_ACTION: BindingKey<AuthenticateFn<IAuthClient | undefined>>;
const USER_METADATA: BindingKey<AuthenticationMetadata<void> | undefined>;
const CLIENT_METADATA: BindingKey<AuthenticationMetadata<void> | undefined>;
const CURRENT_USER: BindingKey<IAuthUser | undefined>;
const CURRENT_CLIENT: BindingKey<IAuthClient | undefined>;
const CONFIG: BindingKey<AuthenticationConfig>;
const USER_MODEL: BindingKey<Constructor<EntityWithIdentifier>>;
}
export declare const USER_AUTHENTICATION_METADATA_KEY: MetadataAccessor<AuthenticationMetadata<void>, MethodDecorator>;
export declare const CLIENT_AUTHENTICATION_METADATA_KEY: MetadataAccessor<AuthenticationMetadata<void>, MethodDecorator>;