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. From Diffusion 6.5, script builders are no longer immutable. Each builder operation mutates this script builder and returns it.

Hierarchy

  • SystemAuthenticationScriptBuilder

Index

Methods

abstainAnonymousConnections

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

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to contain 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

    this builder, modified to contain 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

    this builder, modified to contain 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

    this builder, modified to contain 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

    this builder, modified to contain the deny anonymous connections command.

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

      specifies the name of the client proposed property to be ignored

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to ignore the specified client proposed property

removePrincipal

  • Remove a principal.

    Parameters

    • principal: string

      the principal name

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to remove the principal

setPassword

  • Set a principal's password.

    Parameters

    • principal: string

      the principal name

    • password: string

      the principal's password

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to contain the changed password

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

      specifies the name of the client proposed property to be allowed

    • allowedValues: string[]

      specifies a set of allowed values for the client proposed property

    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

      specifies the name of the client proposed property to be allowed

    • regex: string
      regular expression which will be matched against supplied values to determine whether they are valid

    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

      the principal name

    • password: string

      the principal's password

    Returns SystemAuthenticationScriptBuilder

    this builder, modified to verify the password