Module bauplan.authentication.controller

Authentication controller

Separate from bauplan.authentication to prevent circular dependency loop in bauplan.router.base

var AuthenticationController = require("bauplan.authentication.controller");

or as part of the Bauplan bundle

var Bauplan = require("bauplan");
var AuthenticationController = Bauplan.AuthenticationController;

To authenticate a user (and redirect to view that had required authentication)

AuthenticationController.authenticate(true);

To deauthenticate a user (and redirect to logout view)

AuthenticationController.deauthenticate();
Returns

BauplanAuthenticationController

Type
instance
Source:
See:

Members

(inner) _model :string

Type:
  • string
Default Value:
  • authentication.controller
Source:

Methods

authenticate(registered, noredirectopt)

Authenticates user and redirects to view that required authentication

Parameters
Name Type Attributes Description
registered boolean

Whether the user has been reigistered (erm...?)

noredirect boolean <optional>

Whether to prevent redirect after authentication

Source:
Fires

deauthenticate()

Deauthenticates the user and redirects to logged out view

Source:
Fires

(inner) redirect()

Redirects user to URL that prompted authentication (or the home page if none)

Source: