Skip to main content

Class: StrategyInstance

model/postgres/StrategyInstance.entity.StrategyInstance

Entity representing an instance of a strategy including its config.

For example one GiHub instance as instance of strategy type GitHub.

One StrategyInstance equates to 0-n IMSs of the same template in the backend which all reference the same ims instance.

Constructors

constructor

new StrategyInstance(type)

Parameters

NameTypeDescription
typestringThe strategy this is an instance of

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:19

Properties

doesImplicitRegister

doesImplicitRegister: boolean

If true, a user automatically gets a registration token, if they tried to login and an account was not found but the user provided credentials (i.e. sucessfully authenticated with the 3rd party). Needs Strategy.allowsImplicitSignup to be true.

If false, login fails if no known user was found.

Example

false

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:107


id

id: string

The unique ID of this strategy instance

Example

12345678-90ab-cdef-fedc-ab0987654321

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:29


instanceConfig

instanceConfig: object

The configuration of the instance needed to perform authentication with it.

The data this contains is up to the strategy this is an instance of. For example client id + client secret; urls etc.

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:50


isLoginActive

isLoginActive: boolean

If true, this strategy instance allows login of registered users to retrieve an access token. Additionally the strategy must have Strategy.canLoginRegister set to true

If false, users are not allowed to login using this instance.

Example

true

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:71


isSelfRegisterActive

isSelfRegisterActive: boolean

If true users can create an account themselves with the registration token they obtained from this instance. This only affects registration, not linking an additional account. Additionally the strategy must have Strategy.canLoginRegister set to true

If false accounts cannot be created without being admin.

Example

true

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:83


isSyncActive

isSyncActive: boolean

If true, and Strategy.canSync is true, the sync service can retrieve access tokens for ims users from this strategy instnce.

If false, no tokens will be handed out for the instance

Example

false

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:94


name

name: string

An optional human readable name for the strategy.

Can be displayes in a UI etc. but is not necesarrily unique.

Example

"Github-Enterprise-Example"

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:40


type

Readonly type: string

The unique string name of the strategy this is an instance of

The strategy of an instance is set on initialization and cannot be changed

Example

"userpass"

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:60

Accessors

callbackUrl

get callbackUrl(): string

Gets the callback url for this instance

Returns

string

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:112

Methods

toJSON

toJSON(): Object

Returns

Object

NameType
callbackUrlstring
doesImplicitRegisterboolean
idstring
isLoginActiveboolean
isSelfRegisterActiveboolean
isSyncActiveboolean
namestring
typestring

Defined in

gropius-login-service/backend/src/model/postgres/StrategyInstance.entity.ts:116