oidc

package
v0.0.0-...-25ffe3b Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingIdToken = errors.New("missing id_token")
)

Functions

func NewConfig

func NewConfig(provider *oidc.Provider) *oauth2.Config

func NewProvider

func NewProvider() (*oidc.Provider, error)

Types

type AuthorizationError

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

func (AuthorizationError) Error

func (e AuthorizationError) Error() string

type Claims

type Claims struct {
	jwt.RegisteredClaims

	Email             string `json:"email"`
	PreferredUsername string `json:"preferred_username"`
	Name              string `json:"name"`
	Picture           string `json:"picture"`
}

type Handler

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

func NewHandler

func NewHandler(provider *oidc.Provider, config *oauth2.Config, session *Session) *Handler

func (*Handler) Callback

func (h *Handler) Callback(ctx echo.Context) error

func (*Handler) Redirect

func (h *Handler) Redirect(ctx echo.Context) error

type Session

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

func NewSession

func NewSession() (*Session, error)

func (*Session) Claims

func (s *Session) Claims(ctx echo.Context) (*Claims, error)

func (*Session) Require

func (s *Session) Require(next echo.HandlerFunc) echo.HandlerFunc

Jump to

Keyboard shortcuts

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