Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SystemAuthenticationScriptBuilder

A builder that can be used to create scripts for use with updateAuthenticationStore.

Facilitates producing scripts that contain the mapping of roles to specific principals/passwords.

Hierarchy

  • SystemAuthenticationScriptBuilder

Index

Methods

abstainAnonymousConnections

  • Instruct the system authentication handler to defer authentication decisions for anonymous connections to subsequent handlers.

    Returns SystemAuthenticationScriptBuilder

    a new builder containing the abstain anonymous connections command.

addPrincipal

  • Add a principal.

    If lockingPrincipal is defined, the new principal can only be edited by the principal defined in the lock.

    The script will fail if the principal is already defined at the server.

    Parameters

    • principal: string

      the principal name

    • password: string

      the principal's password

    • Optional roles: string[]

      the assigned roles for the principal, default = []

    • Optional lockingPrincipal: undefined | string

      the name of the principal that can edit this principal

    Returns SystemAuthenticationScriptBuilder

    a new builder containing the new principal

allowAnonymousConnections

  • Instruct the system authentication to allow anonymous connections.

    Parameters

    • Optional roles: string[]

      the roles to assign to anonymous sessions, default = []

    Returns SystemAuthenticationScriptBuilder

    a new builder containing the allow anonymous connections command.

assignRoles

  • Change a principal's assigned roles.

    Parameters

    • principal: string

      the principal name.

    • roles: string[]

      an array of roles

    Returns SystemAuthenticationScriptBuilder

    a new builder containing the changed roles

build

  • build(): string
  • Create the script string.

    Returns string

    the script

denyAnonymousConnections

  • Instruct the system authentication to deny anonymous connections.

    Returns SystemAuthenticationScriptBuilder

    a new builder containing the deny anonymous connections command.

removePrincipal

  • Remove a principal.

    Parameters

    • principal: string

      the principal name

    Returns SystemAuthenticationScriptBuilder

    a new builder containing the remove command

setPassword

  • Set a principal's password.

    Parameters

    • principal: string

      the principal name

    • password: string

      the principal's password

    Returns SystemAuthenticationScriptBuilder

    a new builder containing the changed password

verifyPassword

  • Assert that a principal's password is password.

    This command doesn't update the store. It can be used in conjunction with setPassword to create a script that updates a password only if the previous password is supplied.

    Parameters

    • principal: string

      the principal name

    • password: string

      the principal's password

    Returns SystemAuthenticationScriptBuilder

    a new builder containing the verification command