Create a session for a user or an app.

Prev Next
Post
/sys/v1/session/auth

Authenticate a user or an app to begin a session. The caller needs to provide a basic authentication token or an appropriate request body (see input type). The response body contains a bearer authentication token which needs to be provided by subsequent calls for the duration of the session.

If this is basic auth and the user has MFA devices configured, the response also contains challenge for the device to sign. Until the signed assertion is passed to POST /sys/v1/session/auth/2fa/fido2 to complete 2FA, the bearer token can't be used for anything else.

Security
HTTP
Type basic
API Key: apiKeyAuth
Header parameter nameAuthorization
Body parameters
Expand All
token_type
string
Valid values[ "Bearer", "Cookie" ]
OneOf
object
object
method
string Required
Valid values[ "saml-response" ]
id
string | null
response
string Required
object
object
method
string Required
Valid values[ "oauth-auth-code" ]
idp_id
string (byte) Required
code
string Required
email
string Required
object
object
method
string Required
Valid values[ "ldap-basic-auth" ]
idp_id
string (byte) Required
email
string Required
password
string Required
acct_id
string (uuid) | null

The account where the IdP is configured. This should only be used if attempting to self-provision into the account. (Self-provisioning may not be possible for existing users; they may need to be manually invited into the account.)

object
object
method
string Required
Valid values[ "auth-by-app-name" ]
acct_id
string (uuid) Required
name
string Required
Max length4096
Pattern^[^\n]*[^\s\n][^\n]*$
password
string Required
object
object
method
string Required
Valid values[ "aws-iam" ]
acct_id
string (uuid) Required
region
string Required
headers
object Required
property*
string additionalProperties
object
object
method
string Required
Valid values[ "password" ]
email
string (email) Required

The user's email.

password
string Required

The user's password.

recaptcha_response
string | null

The response token after solving a reCAPTCHA successfully.

Responses
2XX

Success result

Expand All
object
token_type
string
Valid values[ "Bearer", "Cookie" ]
expires_in
integer
Minimum0
Maximum4294967295
access_token
string

Token value that the client should subsequently pass in Authorization header.

entity_id
string (uuid)
challenge
object
u2f_challenge
string
u2f_keys
Array of object (U2fRegisteredKey)
object
keyHandle
string
version
string
fido2_assertion_options
object
challenge
string (byte)
timeout
integer | null

The time for which response from the authenticator would be awaited. This should only be a hint as per the spec. This is in milliseconds.

rpId
string | null

This optional member specifies the relying party identifier claimed by the caller. If omitted, its value will be the CredentialsContainer object’s relevant settings object's origin's effective domain.

allowCredentials
Array of object (PublicKeyCredentialDescriptor) | null

This OPTIONAL member contains a list of [PublicKeyCredentialDescriptor] objects representing public key credentials acceptable to the caller, in descending order of the caller’s preference (the first item in the list is the most preferred credential, and so on down the list).

object
type
string

https://www.w3.org/TR/webauthn-2/#enum-credentialType

This enum defines valid cred types.

Valid values[ "public-key" ]
id
string (byte)
transports
Array of object (AuthenticatorTransport) | null

Hints by relying party on what transport client should use to communicate with authenticator.

Hints by relying party on how client should communicate with the authenticator.

https://www.w3.org/TR/webauthn-2/#enum-transport

OneOf
string
string
Valid values[ "usb", "nfc", "ble", "internal" ]
string
string
userVerification
string
Valid values[ "required", "preferred", "discouraged" ]
extensions
object
appidExclude
string | null

This extension excludes authenticators during registration based on legacy u2f key handles specified in "excludeCredentials". If that key handle was created with that device, it is excluded.

https://www.w3.org/TR/webauthn-2/#sctn-appid-exclude-extension

appid
string | null

This extension allows RPs that have previously registered a cred using legacy U2F APIs to request an assertion.

https://www.w3.org/TR/webauthn-2/#sctn-appid-extension

example.extension.bool
boolean | null

Dummy extension used by conformance tests

allowed_mfa_methods
Array of object (MfaAuthMethod) | null
OneOf
MfaAuthMethodVariantFido2
object (MfaAuthMethodVariantFido2)
Fido2
object
challenge
object
challenge
string (byte)
timeout
integer | null

The time for which response from the authenticator would be awaited. This should only be a hint as per the spec. This is in milliseconds.

rpId
string | null

This optional member specifies the relying party identifier claimed by the caller. If omitted, its value will be the CredentialsContainer object’s relevant settings object's origin's effective domain.

allowCredentials
Array of object (PublicKeyCredentialDescriptor) | null

This OPTIONAL member contains a list of [PublicKeyCredentialDescriptor] objects representing public key credentials acceptable to the caller, in descending order of the caller’s preference (the first item in the list is the most preferred credential, and so on down the list).

object
type
string

https://www.w3.org/TR/webauthn-2/#enum-credentialType

This enum defines valid cred types.

Valid values[ "public-key" ]
id
string (byte)
transports
Array of object (AuthenticatorTransport) | null

Hints by relying party on what transport client should use to communicate with authenticator.

Hints by relying party on how client should communicate with the authenticator.

https://www.w3.org/TR/webauthn-2/#enum-transport

OneOf
string
string
Valid values[ "usb", "nfc", "ble", "internal" ]
string
string
userVerification
string
Valid values[ "required", "preferred", "discouraged" ]
extensions
object
appidExclude
string | null

This extension excludes authenticators during registration based on legacy u2f key handles specified in "excludeCredentials". If that key handle was created with that device, it is excluded.

https://www.w3.org/TR/webauthn-2/#sctn-appid-exclude-extension

appid
string | null

This extension allows RPs that have previously registered a cred using legacy U2F APIs to request an assertion.

https://www.w3.org/TR/webauthn-2/#sctn-appid-extension

example.extension.bool
boolean | null

Dummy extension used by conformance tests

challenge_token
string (byte)
mfa_devices
Array of object (MfaDevice)
object
name
string

Name given to the FIDO device.

Max length4096
Pattern^[^\n]*[^\s\n][^\n]*$
type
string

Type of MFA device

Valid values[ "U2f", "Fido2" ]
origin
string | null

Origin of the FIDO device.