@adonisjs/auth
Version:
Official authentication provider for Adonis framework
34 lines (33 loc) • 972 B
TypeScript
import type { ApplicationService } from '@adonisjs/core/types';
import type { AuthService } from '../src/types.ts';
declare module '@adonisjs/core/types' {
interface ContainerBindings {
'auth.manager': AuthService;
}
}
/**
* The AuthProvider service provider registers the auth manager
* with the IoC container as a singleton
*
* @example
* // The auth manager is automatically registered and can be injected
* container.use('auth.manager')
*/
export default class AuthProvider {
protected app: ApplicationService;
/**
* Creates a new AuthProvider instance
*
* @param app - The application service instance
*/
constructor(app: ApplicationService);
/**
* Registers the auth manager as a singleton service
* in the IoC container
*
* @example
* // This method is called automatically by AdonisJS
* // The auth manager becomes available as 'auth.manager'
*/
register(): void;
}