webclient

package
v0.0.0-...-ce5cb77 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: EUPL-1.2 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSessionNotFound = errors.New("session not found")

Functions

This section is empty.

Types

type AuthzClientSession

type AuthzClientSession struct {
	ID            string                `json:"id"`
	OPIssuer      string                `json:"op_issuer"`
	State         string                `json:"state"`
	Nonce         string                `json:"nonce"`
	Verifier      string                `json:"verifier"`
	AuthURL       string                `json:"auth_url"`
	TokenResponse *oauth2.TokenResponse `json:"token_response"`
	AccessToken   string                `json:"access_token"`
	RefreshToken  string                `json:"refresh_token"`
}

type AuthzClientSessionStore

type AuthzClientSessionStore interface {
	GetAuthzClientSessionByID(id string) (*AuthzClientSession, error)
	GetAuthzClientSessionByState(state string) (*AuthzClientSession, error)
	SaveAuthzClientSession(session *AuthzClientSession) error
	DeleteAuthzClientSession(state string) error
}

func NewMockAuthzClientSessionStore

func NewMockAuthzClientSessionStore() AuthzClientSessionStore

type Client

type Client struct {
	ClientID       string
	RedirectURI    string
	Scopes         []string
	ServerMetadata oauth2.ServerMetadata
	// contains filtered or unexported fields
}

func NewFromServerMetadata

func NewFromServerMetadata(serverMetadata oauth2.ServerMetadata) (*Client, error)

func (*Client) AuthCodeURL

func (cl *Client) AuthCodeURL(state, nonce, verifier string, opts ...oauth2.ParameterOption) (string, error)

func (*Client) Exchange

func (cl *Client) Exchange(code, verifier string, opts ...oauth2.ParameterOption) (*oauth2.TokenResponse, error)

func (*Client) MountRoutes

func (cl *Client) MountRoutes(g *echo.Group)

Jump to

Keyboard shortcuts

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