oidc

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientID     string
	ClientSecret string
	RedirectURL  string
	Issuer       string
}

type OIDCAuthenticator

type OIDCAuthenticator[T any] struct {
	// contains filtered or unexported fields
}

func NewAuthenticator

func NewAuthenticator[T any](cfg *Config, opts ...Option) (*OIDCAuthenticator[T], error)

func (*OIDCAuthenticator[T]) Callback added in v1.0.1

func (auth *OIDCAuthenticator[T]) Callback(w http.ResponseWriter, req *http.Request, claims *T) error

func (*OIDCAuthenticator[T]) LoginRedirect added in v1.0.1

func (auth *OIDCAuthenticator[T]) LoginRedirect(w http.ResponseWriter, req *http.Request, state string)

type Option

type Option func(*OIDCAuthenticator[any])

func WithScopes

func WithScopes(scopes ...string) Option

func WithStateCookieHttps added in v1.0.1

func WithStateCookieHttps(https bool) Option

func WithStateCookieName

func WithStateCookieName(name string) Option

func WithStateCookieSameSiteMode added in v1.1.0

func WithStateCookieSameSiteMode(mode http.SameSite) Option

func WithStateCookieTTL

func WithStateCookieTTL(ttl time.Duration) Option

Jump to

Keyboard shortcuts

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