Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SystemAuthenticationScriptBuilderImpl

Implementation of the SystemAuthenticationScriptBuilder interface

Hierarchy

  • SystemAuthenticationScriptBuilderImpl

Implements

Index

Properties

Private commands

commands: string = ""

The security script built so far

Methods

abstainAnonymousConnections

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
    • password: string
    • Default value roles: string[] = []
    • Optional lockingPrincipal: undefined | string

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to contain the new principal

allowAnonymousConnections

assignRoles

build

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

    Returns string

    the script

denyAnonymousConnections

ignoreClientProposedProperty

  • Specifies the name of a client proposed session property that should now be ignored by the system authenticator.

    This removes the effect of a previous request to trust the named property.

    since

    6.5

    Parameters

    • propertyName: string

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to ignore the specified client proposed property

Private maybeApppendNewLine

  • maybeApppendNewLine(): void
  • Utility function that appends a new line if commands already has lines

    Returns void

removePrincipal

setPassword

toString

  • toString(): string
  • Convert the system authentication script builder to a string

    Returns string

    a string representation on this object

trustClientProposedPropertyIn

  • Specifies the name of a client proposed session property that should be allowed by the system authenticator along with a set of permissible values. The property will only be allowed if the supplied value matches one of those in the set of values specified.

    since

    6.5

    Parameters

    • propertyName: string
    • allowedValues: string[]

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to allow the specified client proposed property if its value matches one of those supplied

trustClientProposedPropertyMatches

  • Specifies the name of a client proposed session property that should be allowed by the system authenticator along with a regular expression to validate the property value. The property will only be allowed if the supplied value matches with the regular expression.

    since

    6.5

    Parameters

    • propertyName: string
    • regex: string

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to allow the specified client proposed property if its value matches the given regular expression

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
    • password: string

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to verify the password