Skip to main content

Edit an existing strategy instance

PUT 

/auth/api/login/strategy/:type/instance/:id

Updates the values of an existing strategy instance.

The type can not be updated. Only values given in the body will be modified on the instance.

Request

Path Parameters

    id uuidrequired

    The uuid string of an existing strategy instance to edit

    type stringrequired

    The strategy type name of which to search for the instance. Defaults to all types

Body

required
    name string

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

    If given, must be a non empty string

    @exmple "userpass-local"

    isLoginActive boolean

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

    isSelfRegisterActive boolean

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

    isSyncActive boolean

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

    doesImplicitRegister boolean

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

Responses

If successful, the updated strategy instance

Schema
    id stringrequired

    The unique ID of this strategy instance

    name stringrequired

    An optional human readable name for the strategy.

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

    type stringrequired

    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

    isLoginActive booleanrequired

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

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

    isSelfRegisterActive booleanrequired

    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 {@link Strategy.canLoginRegister} set to true

    If false accounts cannot be created without being admin.

    isSyncActive booleanrequired

    If true, and {@link 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

    doesImplicitRegister booleanrequired

    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 {@link Strategy.allowsImplicitSignup} to be true.

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

Loading...