Authenticate OpenID Connect
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.
Body 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.
-
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.
-
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.
curl \
--request POST http://api.example.com/_security/oidc/authenticate \
--header "Content-Type: application/json" \
--data '{"nonce":"string","realm":"string","redirect_uri":"string","state":"string"}'
{
"nonce": "string",
"realm": "string",
"redirect_uri": "string",
"state": "string"
}
{
"access_token": "string",
"expires_in": 42.0,
"refresh_token": "string",
"type": "string"
}