Generate a login token
POST/login-token/:userId
Creates a one-time login token that can be used to sign the specified user in without presenting their credentials. The token is intended for SSO / handoff flows where a trusted backend mints a token on behalf of a user and then redirects the end user through /api/5/login-token/login/{token} to establish a session. The caller must be the target user or have admin rights over them. The request body is optional; when supplied, the properties map is stored with the token and surfaced back to the login handler, useful for passing redirect targets or external context through the handoff.
Request
Responses
- 200
- 400
- 403
- 404
Token successfully generated.
userId is missing or invalid, or request body failed validation.
Authenticated caller is not the target user and does not have admin rights over them.
Target user does not exist.