Create new strategy instance
POST/login/strategyInstance
Creates a new strategy instance.
The type of the instance is set at creation and cannot change later. The type from the url takes precedene. If that is not present, the type from the body will be used.
The required structure of the instanceConfig
is specified by the strategy.
Request
Path Parameters
The type of the new strategy instance. If not given as url parameter, must be given in the body
- application/json
Body
required
The type name of the strategy this is an instance of.
Optional, if given as URL parameter; otherwise required
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"
Set wehter, login should be active on the new strategy Can only be true, if {@link Strategy.canLoginRegister} (default value)
Set whether, user self registration should be active on the new strategy Can only be true, if {@link Strategy.canLoginRegister} (default value)
Set whether, providing sync tokens should be active on the new strategy Can only be true, if {@link Strategy.canSync} (default value)
Set whether, the instance will implicitly register on a unknown login. Can only be true, if {@link Strategy.allowsImplicitSignup} (default value)
Responses
- 200
- 201
- 400
If successful, the created strategy instance object
- application/json
- Schema
- Example (from schema)
Schema
The unique ID of this strategy instance
An optional human readable name for the strategy.
Can be displayes in a UI etc. but is not necesarrily unique.
Can only contain [A-Za-z0-9_-/+= ]*
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
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.
If true
users can create an account themselves with the registration token they obtained from this instance.
Additionally the strategy must have {@link Strategy.canLoginRegister} set to true
If false
accounts cannot be created without being admin.
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
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.
{
"id": "12345678-90ab-cdef-fedc-ab0987654321",
"name": "Github-Enterprise-Example",
"type": "userpass",
"isLoginActive": true,
"isSelfRegisterActive": true,
"isSyncActive": false,
"doesImplicitRegister": false
}
- application/json
- Schema
- Example (from schema)
Schema
The unique ID of this strategy instance
An optional human readable name for the strategy.
Can be displayes in a UI etc. but is not necesarrily unique.
Can only contain [A-Za-z0-9_-/+= ]*
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
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.
If true
users can create an account themselves with the registration token they obtained from this instance.
Additionally the strategy must have {@link Strategy.canLoginRegister} set to true
If false
accounts cannot be created without being admin.
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
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.
{
"id": "12345678-90ab-cdef-fedc-ab0987654321",
"name": "Github-Enterprise-Example",
"type": "userpass",
"isLoginActive": true,
"isSelfRegisterActive": true,
"isSyncActive": false,
"doesImplicitRegister": false
}
If the input data was invalid