Documentation
¶
Overview ¶
Package local implements the development authenticator described in the Local Simulator Contract. It never contacts Google, never uses fetch, and has no environment variables or implicit dev-mode switches.
Index ¶
Constants ¶
const PathSelect = "/local/select"
PathSelect is the POST route that consumes the selected scenario identifier.
const PathStart = "/local"
PathStart is the GET route that serves the scenario selector.
const ProviderName = "local"
ProviderName is the stable name exposed to logs and security events.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
Authenticator is a development Authenticator that presents a selector of preconfigured scenarios and issues a normal session for the chosen one.
func New ¶
func New(scenarios []Scenario, store auth.SubjectStore, issuer auth.SessionIssuer, opts ...Option) *Authenticator
New creates a local authenticator. scenarios is copied, the slice must not be mutated after construction. store and issuer are required.
func (*Authenticator) Mount ¶
func (a *Authenticator) Mount(r router.Router)
Mount implements auth.Authenticator.
func (*Authenticator) Name ¶
func (a *Authenticator) Name() string
Name implements auth.Authenticator.
type Option ¶
type Option func(*Authenticator)
Option configures the authenticator.
func WithAfterLogin ¶
WithAfterLogin sets the redirect target after a successful selection.