oidcadaptor

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package oidcadaptor implements OpenID Connect authorization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OIDCAdaptor

type OIDCAdaptor struct {
	// contains filtered or unexported fields
}

OIDCAdaptor is the filter for OpenID Connect authorization.

func (*OIDCAdaptor) Close

func (o *OIDCAdaptor) Close()

Close closes the filter instance.

func (*OIDCAdaptor) Handle

func (o *OIDCAdaptor) Handle(ctx *context.Context) (result string)

Handle handles the request.

func (*OIDCAdaptor) Inherit

func (o *OIDCAdaptor) Inherit(previousGeneration filters.Filter)

Inherit inherits previous generation of the filter instance.

func (*OIDCAdaptor) Init

func (o *OIDCAdaptor) Init()

Init initializes the filter.

func (*OIDCAdaptor) Kind

func (o *OIDCAdaptor) Kind() *filters.Kind

Kind returns the kind of filter.

func (*OIDCAdaptor) Name

func (o *OIDCAdaptor) Name() string

Name returns the name of the OIDCAdaptor filter instance.

func (*OIDCAdaptor) Spec

func (o *OIDCAdaptor) Spec() filters.Spec

Spec returns the spec used by the OIDCAdaptor instance.

func (*OIDCAdaptor) Status

func (o *OIDCAdaptor) Status() interface{}

Status returns the status of the filter instance.

type Spec

type Spec struct {
	filters.BaseSpec `yaml:",inline"`

	CookieName string `json:"cookieName"`

	ClientID     string `json:"clientId" jsonschema:"required"`
	ClientSecret string `json:"clientSecret" jsonschema:"required"`

	Discovery string `json:"discovery"`

	// If Discovery not configured, following should be configured for OAuth2
	AuthorizationEndpoint string `json:"authorizationEndpoint"`
	TokenEndpoint         string `json:"tokenEndpoint"`
	UserInfoEndpoint      string `json:"userinfoEndpoint"`

	RedirectURI string `json:"redirectURI" jsonschema:"required"`
}

Spec defines the spec of OIDCAdaptor.

Jump to

Keyboard shortcuts

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