Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/alosaur/src/security/authentication/core/mod.ts>AuthenticationScheme

Alosaur - Deno web framework with many decorators
Go to Latest
interface AuthenticationScheme
import { type AuthenticationScheme } from "https://deno.land/x/alosaur@v0.34.0/src/security/authentication/core/mod.ts";

Methods

authenticate(context: SecurityContext): Promise<void>

This function assign to context identity info, uses in Authorization middleware

signInAsync<I, R = any>(context: SecurityContext, identity: Identity<I>): Promise<R>

Create sign identity and assign to context identity info

signOutAsync<T, R>(context: SecurityContext): Promise<R>

Clear sign in info and destroy identity context

onFailureResult(context: SecurityContext): void

Uses in Authorize decorators for handle if AuthPayload result failure

onSuccessResult(context: SecurityContext): void

Uses in Authorize decorators for handle if AuthPayload result success