oauth2

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

func New

func New(store auth.IdentityStore, states auth.StateStore, sessions auth.SessionIssuer, providers []auth.OAuthProvider, opts ...Option) *Authenticator

func (*Authenticator) Mount

func (a *Authenticator) Mount(r router.Router)

func (*Authenticator) Name

func (a *Authenticator) Name() string

type Option

type Option func(*Authenticator)

func WithAfterLogin

func WithAfterLogin(path string) Option

func WithRedirectValidator added in v0.0.8

func WithRedirectValidator(fn func(string) bool) Option

WithRedirectValidator lets /oauth/<provider>?redirect_uri=<url> override afterLogin for THIS login, once <url> passes fn — e.g. an identity provider (iam) serving several consumer domains under one SSO login, returning the browser to whichever one it came from. Ignored entirely if never called.

Directories

Path Synopsis
provider

Jump to

Keyboard shortcuts

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