Home Reference Source
public class | source

NoAuth

Extends:

Auth → NoAuth

Allows login without any form of credential exchange.

Meant for testing / developer debugging etc.

Constructor Summary

Public Constructor
public

constructor(options: object)

Member Summary

Public Members
public

Method Summary

Public Methods
public

install(app: *, prefix: *)

Make any request to /<method>/login.json to gain access.

Inherited Summary

From class Auth
public

Additional settings given to passport.authenticate.

public

Custom fields

public

Default error message to return instead of actual errors (security).

public

Default roles new registered users should assume.

public

This is a standard descriptor of this authentication mechanism that is publicly shared.

public

method: *

Authentication method name.

public

users: CachedCollection

Users collection.

public

async createProfileFromCredential(id: *, extra: {}): *

helper method that creates a profile object from a credential address

public

createUserFromProfile(profile: Profile): User

Helper method that creates an User object from a Profile

public

findUser(value: string): User | false

Helper method that finds an user based on a credential.

public

generateId(): *

public

handleUserLoginByProfile(username: string, profile: Profile, done: Function, req: Request)

Helper method for SSO type logins.

public abstract

install(app: ExpressApplication, prefix: string, passport: Passport)

Must be overridden to provide implementation of said authentication method.

public

loggedIn(redirect: boolean): ExpressMiddleware

Helper method that produces a middleware to handle successful logged in case.

Public Constructors

public constructor(options: object) source

Override:

Auth#constructor

Params:

NameTypeAttributeDescription
options object

options

options.method string
  • optional
  • default: 'nothing'

method name

options.loginUserId string

id of user to give access of

Public Members

public loginUserId: * source

Public Methods

public install(app: *, prefix: *) source

Make any request to /<method>/login.json to gain access.

Override:

Auth#install

Params:

NameTypeAttributeDescription
app *
prefix *