Documentation
¶
Overview ¶
Package dummy provides an Authenticator that decodes the bearer token as a base64-encoded JSON Actor. Useful in tests where no real IAM server is available.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator[U any] struct { // contains filtered or unexported fields }
Authenticator decodes the bearer token as a base64-encoded JSON Actor. For user actors it fetches the full user record via the service-supplied findUser function so callers receive a populated user entity (matching the behavior of the IAM authenticator).
func (*Authenticator[U]) Authenticate ¶
func (a *Authenticator[U]) Authenticate( ctx context.Context, token string, ) (*authorization.Actor, *U, error)
func (*Authenticator[U]) EnsureRoles ¶
func (a *Authenticator[U]) EnsureRoles( _ context.Context, _ string, actor *authorization.Actor, ) (*authorization.Actor, error)
EnsureRoles is a no-op: the dummy token already encodes the full actor, including its permissions and admin flag.
Click to show internal directories.
Click to hide internal directories.