Documentation
¶
Overview ¶
Logout of OpenID Connect.
Invalidate an access token and a refresh token that were generated as a response to the `/_security/oidc/authenticate` API.
If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout.
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.
Index ¶
- Variables
- type NewOidcLogout
- type OidcLogout
- func (r OidcLogout) Do(providedCtx context.Context) (*Response, error)
- func (r *OidcLogout) ErrorTrace(errortrace bool) *OidcLogout
- func (r *OidcLogout) FilterPath(filterpaths ...string) *OidcLogout
- func (r *OidcLogout) Header(key, value string) *OidcLogout
- func (r *OidcLogout) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *OidcLogout) Human(human bool) *OidcLogout
- func (r OidcLogout) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *OidcLogout) Pretty(pretty bool) *OidcLogout
- func (r *OidcLogout) Raw(raw io.Reader) *OidcLogout
- func (r *OidcLogout) RefreshToken(refreshtoken string) *OidcLogout
- func (r *OidcLogout) Request(req *Request) *OidcLogout
- func (r *OidcLogout) Token(token string) *OidcLogout
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type NewOidcLogout ¶
type NewOidcLogout func() *OidcLogout
NewOidcLogout type alias for index.
func NewOidcLogoutFunc ¶
func NewOidcLogoutFunc(tp elastictransport.Interface) NewOidcLogout
NewOidcLogoutFunc returns a new instance of OidcLogout with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type OidcLogout ¶
type OidcLogout struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *OidcLogout
Logout of OpenID Connect.
Invalidate an access token and a refresh token that were generated as a response to the `/_security/oidc/authenticate` API.
If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout.
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.
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-logout.html
func (OidcLogout) Do ¶
func (r OidcLogout) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a oidclogout.Response
func (*OidcLogout) ErrorTrace ¶ added in v8.18.0
func (r *OidcLogout) ErrorTrace(errortrace bool) *OidcLogout
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*OidcLogout) FilterPath ¶ added in v8.18.0
func (r *OidcLogout) FilterPath(filterpaths ...string) *OidcLogout
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*OidcLogout) Header ¶
func (r *OidcLogout) Header(key, value string) *OidcLogout
Header set a key, value pair in the OidcLogout headers map.
func (*OidcLogout) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*OidcLogout) Human ¶ added in v8.18.0
func (r *OidcLogout) Human(human bool) *OidcLogout
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (OidcLogout) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*OidcLogout) Pretty ¶ added in v8.18.0
func (r *OidcLogout) Pretty(pretty bool) *OidcLogout
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*OidcLogout) Raw ¶ added in v8.18.0
func (r *OidcLogout) Raw(raw io.Reader) *OidcLogout
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*OidcLogout) RefreshToken ¶ added in v8.18.0
func (r *OidcLogout) RefreshToken(refreshtoken string) *OidcLogout
RefreshToken The refresh token to be invalidated. API name: refresh_token
func (*OidcLogout) Request ¶ added in v8.18.0
func (r *OidcLogout) Request(req *Request) *OidcLogout
Request allows to set the request property with the appropriate payload.
func (*OidcLogout) Token ¶ added in v8.18.0
func (r *OidcLogout) Token(token string) *OidcLogout
Token The access token to be invalidated. API name: token
type Request ¶ added in v8.18.0
type Request struct { // RefreshToken The refresh token to be invalidated. RefreshToken *string `json:"refresh_token,omitempty"` // Token The access token to be invalidated. Token string `json:"token"` }
Request holds the request body struct for the package oidclogout
type Response ¶ added in v8.18.0
type Response struct { // Redirect A URI that points to the end session endpoint of the OpenID Connect Provider // with all the parameters of the logout request as HTTP GET parameters. Redirect string `json:"redirect"` }
Response holds the response body struct for the package oidclogout