Documentation
¶
Overview ¶
Package auth defines the Verifier interface used by the server to validate bearer tokens at the session.hello handshake.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidToken = errors.New("auth: invalid token")
ErrInvalidToken is returned by StaticBearer when the token is not in the configured set.
Functions ¶
This section is empty.
Types ¶
type Verifier ¶
Verifier validates a bearer token and returns the authenticated principal name.
func StaticBearer ¶
StaticBearer returns a Verifier that accepts a fixed set of tokens. The map keys are the accepted token strings; the values are the resulting principal identifiers.
Click to show internal directories.
Click to hide internal directories.