User authentication methods management¶
Parameter | Type | Description |
---|---|---|
id | int | read_only |
needs_change | bool | default == false |
position | int | required |
type | string {extauth, password, sshkey} | |
external_authentication | int | default == null |
Listing user authentication methods¶
Request
Method | GET
|
Path | /api/system/users/:user_id/methods
|
Possible Response
Status | 200 OK
|
Headers | Content-Type: Application/JSON
|
Body | [
UserAuthenticationMethodModel,
...
]
|
Possible Response
Status | 404 NOT FOUND
|
Creating user authentication method¶
Request
Method | POST
|
Path | /api/system/users/:user_id/methods
|
Headers | Content-Type: Application/JSON
|
Body | UserAuthenticationMethodModel
|
Possible Response
Status | 201 CREATED
|
Headers | Content-Type: Application/JSON
|
Body | UserAuthenticationMethodModel
|
Possible Response
Status | 400 BAD REQUEST
|
Headers | Content-Type: Application/JSON
|
Body | ValidationErrors
|
Possible Response
Status | 404 NOT FOUND
|
Description | No user with given user_id. |
Retrieving user authentication method¶
Request
Method | GET
|
Path | /api/system/users/:user_id/methods/:method_id
|
Possible Response
Status | 200 OK
|
Headers | Content-Type: Application/JSON
|
Body | UserAuthenticationMethodModel
|
Possible Response
Status | 404 NOT FOUND
|
Updating user authentication method
Request
Method | PATCH, PUT
|
Path | /api/system/users/:user_id/methods/:method_id
|
Body | UserAuthenticationMethodModel
|
Possible Response
Status | 200 OK
|
Headers | Content-Type: Application/JSON
|
Body | UserAuthenticationMethodModel
|
Possible Response
Status | 400 BAD REQUEST
|
Headers | Content-Type: Application/JSON
|
Body | ValidationErrors
|
Possible Response
Status | 404 NOT FOUND
|
Deleting user authentication method¶
Request
Method | DELETE
|
Path | /api/system/users/:user_id/methods/:method_id
|
Possible Response
Status | 204 NO CONTENT
|
Possible Response
Status | 404 NOT FOUND
|