Authenticate OpenID Connect

  • POST /_security/oidc/authenticate
Auth

Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication.

Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.

Request body

nonce string required

Associate a client session with an ID token and mitigate replay attacks. This value needs to be the same as the one that was provided to the /_security/oidc/prepare API or the one that was generated by Elasticsearch and included in the response to that call.

realm string

The name of the OpenID Connect realm. This property is useful in cases where multiple realms are defined.

redirect_uri string required

The URL to which the OpenID Connect Provider redirected the User Agent in response to an authentication request after a successful authentication. This URL must be provided as-is (URL encoded), taken from the body of the response or as the value of a location header in the response from the OpenID Connect Provider.

state string required

Maintain state between the authentication request and the response. This value needs to be the same as the one that was provided to the /_security/oidc/prepare API or the one that was generated by Elasticsearch and included in the response to that call.

Response

application/json
access_token string required

The Elasticsearch access token.

expires_in number required

The duration (in seconds) of the tokens.

refresh_token string required

The Elasticsearch refresh token.

type string required

The type of token.