Skip to main content

Class: CreateStrategyInstanceInput

api-login/strategy/dto/create-strategy-instance.dto.CreateStrategyInstanceInput

Input data type for the create query of a strategy instance

Needs to contain all data for a strategy instance (except the type if that is given in the url)

Hierarchy

Constructors

constructor

new CreateStrategyInstanceInput()

Inherited from

UpdateStrategyInstanceInput.constructor

Properties

doesImplicitRegister

Optional doesImplicitRegister: boolean

Set whether, the instance will implicitly register on a unknown login. Can only be true, if Strategy.allowsImplicitSignup (default value)

Example

false

Inherited from

UpdateStrategyInstanceInput.doesImplicitRegister

Defined in

login-service/src/api-login/strategy/dto/update-strategy-instance.dto.ts:56


instanceConfig

instanceConfig: object

The data required by the strategy to configure the instance.

For example: the client id and secret for an oauth strategy

Example

{"clientId": "1234", "clientSecret": "secret"}

Inherited from

UpdateStrategyInstanceInput.instanceConfig

Defined in

login-service/src/api-login/strategy/dto/update-strategy-instance.dto.ts:24


isLoginActive

Optional isLoginActive: boolean

Set wehter, login should be active on the new strategy Can only be true, if Strategy.canLoginRegister (default value)

Example

true

Inherited from

UpdateStrategyInstanceInput.isLoginActive

Defined in

login-service/src/api-login/strategy/dto/update-strategy-instance.dto.ts:32


isSelfRegisterActive

Optional isSelfRegisterActive: boolean

Set whether, user self registration should be active on the new strategy Can only be true, if Strategy.canLoginRegister (default value)

Example

true

Inherited from

UpdateStrategyInstanceInput.isSelfRegisterActive

Defined in

login-service/src/api-login/strategy/dto/update-strategy-instance.dto.ts:40


isSyncActive

Optional isSyncActive: boolean

Set whether, providing sync tokens should be active on the new strategy Can only be true, if Strategy.canSync (default value)

Example

false

Inherited from

UpdateStrategyInstanceInput.isSyncActive

Defined in

login-service/src/api-login/strategy/dto/update-strategy-instance.dto.ts:48


name

Optional name: string

The name for the strategy instance to create. Can be left out.

If given, must be a non empty string matching /^[a-zA-Z0-9+/\-_= ]+$/

Exmple

"userpass-local"

Inherited from

UpdateStrategyInstanceInput.name

Defined in

login-service/src/api-login/strategy/dto/update-strategy-instance.dto.ts:15


type

Optional type: string

The type name of the strategy this is an instance of.

Optional, if given as URL parameter; otherwise required

Example

"userpass"

Defined in

login-service/src/api-login/strategy/dto/create-strategy-instance.dto.ts:18

Methods

check

Static check(input): CreateStrategyInstanceInput

Checks wehter the input is a valid CreateStrategyInstanceInput

Needed:

Parameters

NameTypeDescription
inputCreateStrategyInstanceInputThe input object to check

Returns

CreateStrategyInstanceInput

If succeessful, the original input

Overrides

UpdateStrategyInstanceInput.check

Defined in

login-service/src/api-login/strategy/dto/create-strategy-instance.dto.ts:30