Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Authenticator

import { Authenticator } from "https://raw.githubusercontent.com/mandarineorg/mandarinets/master/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

class Authenticator implements [[[Mandarine.Security].Auth].Authenticator] {
private isHTTPAuthenticated(requestContext: Mandarine.Types.RequestContext): [boolean, string | undefined];
private verifyAuthenticationSatisfaction(withSessionContainer?: boolean): boolean;
public getAuthenticationId(requestContext: Mandarine.Types.RequestContext): string | undefined;
public stopHTTPAuthentication(requestContext: Mandarine.Types.RequestContext): void;
}

§Implements

§
[[[Mandarine.Security].Auth].Authenticator]
[src]

§Methods

§
isHTTPAuthenticated(requestContext: Mandarine.Types.RequestContext): [boolean, string | undefined] private
[src]
§
verifyAuthenticationSatisfaction(withSessionContainer?: boolean): boolean private
[src]
§
getAuthenticationId(requestContext: Mandarine.Types.RequestContext): string | undefined
[src]
@param requestContext

Refers to the context of the current request.

§

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.

@param data

Contains the information to execute the authentication such as user & password. It takes an optional value for executer which is a function to be executed when authentication is done (if successful)

§
@param data

Contains the information to execute the authentication such as user & password. Optionally, you can pass executers to the executer object. Where authExecuter is a function to be called at the end of the authentication if successful & httpExecuter a function to be called at the end of the HTTP authentication process.

§
stopHTTPAuthentication(requestContext: Mandarine.Types.RequestContext): void
[src]

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

@param requestContext

Request context the user has been sent which should theorically contain the data of the authentication.