Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SecurityContext

Base-class for a context that authenticates users and manages security.

Hierarchy

Index

Constructors

constructor

Properties

Private Optional authenticatedUser

authenticatedUser: Authenticatable

The currently authenticated user, if one exists.

Protected Readonly bus

Readonly name

name: string

Readonly repository

Methods

attempt

  • Attempt to authenticate a user based on their credentials. If the credentials are valid, the user will be authenticated and the authentication will be persisted.

    Parameters

    • credentials: Record<string, string>

    Returns Promise<Maybe<Authenticatable>>

attemptOnce

  • Attempt to authenticate a user based on their credentials. If the credentials are valid, the user will be authenticated, but the authentication will not be persisted. That is, when the lifecycle ends, the user will be unauthenticated implicitly.

    Parameters

    • credentials: Record<string, string>

    Returns Promise<Maybe<Authenticatable>>

authenticate

authenticateOnce

  • Authenticate the given user, without persisting the authentication. That is, when the lifecycle ends, the user will be unauthenticated implicitly.

    Parameters

    Returns Promise<void>

flush

  • flush(): Promise<void>

flushOnce

  • flushOnce(): Promise<void>

Abstract getCredentials

  • getCredentials(): Awaitable<Record<string, string>>

getUser

hasUser

  • hasUser(): boolean

initialize

Abstract persist

resume

  • resume(): Promise<void>
  • Assuming a user is still authenticated in the context, try to look up and fill in the user.

    Returns Promise<void>

Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.