Skip to main content
Module

x/mandarinets/mod.ts>Authenticator

Mandarine.TS is a typescript, decorator-driven framework that allows you to create server-side applications. Mandarine.TS provides a range of built-in solutions such as Dependency Injection, Components, ORM and more. Under its umbrella, Mandarine.TS has 4 modules: Core, Data, Security and MVC, these modules will offer you the requirements to build a Mandarine-powered application.
Latest
class Authenticator
implements [[[Mandarine.Security].Auth].Authenticator]
import { Authenticator } from "https://deno.land/x/mandarinets@v2.3.2/mod.ts";

The authenticator class contains the logic behind executing built-in authentication by Mandarine. This class is requested by Mandarine's built-in authentication

Methods

private
isHTTPAuthenticated(requestContext: Mandarine.Types.RequestContext): [boolean, string | undefined]
private
verifyAuthenticationSatisfaction(withSessionContainer?: boolean): boolean
getAuthenticationId(requestContext: Mandarine.Types.RequestContext): string | undefined
performAuthentication(data: Mandarine.Security.Auth.PerformAuthenticationOptions): [Mandarine.Security.Auth.AuthenticationResult, Mandarine.Security.Auth.UserDetails | undefined]

This functions performs authentication using Mandarine built-in auth system. Returns the status of the authentication (Mandarine.Security.Auth.AuthenticationResult) & the object with the user's data if successful.

performHTTPAuthentication(data: Mandarine.Security.Auth.PerformHTTPAuthenticationOptions): [Mandarine.Security.Auth.AuthenticationResult, Mandarine.Security.Auth.UserDetails | undefined]
stopHTTPAuthentication(requestContext: Mandarine.Types.RequestContext): void

Stops the authentication active on the HTTP request (logs out)