Documentation
¶
Index ¶
Constants ¶
View Source
const ( KindMTLS = "mtls" KindJWT = "jwt" )
Kind values for PrincipalInfo, named after the authentication method that established the identity.
Variables ¶
This section is empty.
Functions ¶
func InjectContext ¶
func InjectContext(ctx context.Context, p PrincipalInfo) context.Context
InjectContext returns a new context with the given PrincipalInfo.
Types ¶
type PrincipalInfo ¶
PrincipalInfo contains information about an authenticated principal.
func FromContext ¶
func FromContext(ctx context.Context) (PrincipalInfo, bool)
FromContext returns the PrincipalInfo from the context, if any.
Click to show internal directories.
Click to hide internal directories.