Files
auth/authmw/identity_enricher.go
T

15 lines
437 B
Go
Raw Permalink Normal View History

package authmw
import (
"context"
"code.nochebuena.dev/einherjar/contracts/security"
)
// IdentityEnricher is implemented by the application layer to load user data
// from token claims and return a populated security.Identity.
// Called once per request by EnrichmentMiddleware after token verification.
type IdentityEnricher interface {
Enrich(ctx context.Context, uid string, claims map[string]any) (security.Identity, error)
}