oidclogout

package
v8.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2025 License: Apache-2.0 Imports: 12 Imported by: 4

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

Constants

This section is empty.

Variables

View Source
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

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

func (r *OidcLogout) HttpRequest(ctx context.Context) (*http.Request, error)

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

func (r OidcLogout) Perform(providedCtx context.Context) (*http.Response, error)

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

https://github.com/elastic/elasticsearch-specification/blob/3a94b6715915b1e9311724a2614c643368eece90/specification/security/oidc_logout/Request.ts#L22-L52

func NewRequest added in v8.18.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.18.0

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

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

https://github.com/elastic/elasticsearch-specification/blob/3a94b6715915b1e9311724a2614c643368eece90/specification/security/oidc_logout/Response.ts#L20-L27

func NewResponse added in v8.18.0

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL