Documentation
¶
Index ¶
- Constants
- Variables
- func ContextWithAuthNInfo(ctx context.Context, key jwk.Key, accessToken jwt.Token, raw string) context.Context
- func EnrichIncomingContextMetadataWithAuthn(ctx context.Context, l *logger.Logger, clientID string) context.Context
- func GetAccessTokenFromContext(ctx context.Context, l *logger.Logger) jwt.Token
- func GetClientIDFromContext(ctx context.Context, incoming bool) (string, error)
- func GetJWKFromContext(ctx context.Context, l *logger.Logger) jwk.Key
- func GetRawAccessTokenFromContext(ctx context.Context, l *logger.Logger) string
Constants ¶
View Source
const ( AccessTokenKey = "access_token" ClientIDKey = "client_id" )
Variables ¶
Functions ¶
func ContextWithAuthNInfo ¶
func EnrichIncomingContextMetadataWithAuthn ¶ added in v0.11.0
func EnrichIncomingContextMetadataWithAuthn(ctx context.Context, l *logger.Logger, clientID string) context.Context
EnrichIncomingContextMetadataWithAuthn adds the access token and client ID to incoming context metadata
Adding the authn info to gRPC metadata propagates it across services rather than strictly in-process within Go alone
func GetClientIDFromContext ¶ added in v0.11.0
GetClientIDFromContext retrieves the client ID from the metadata in the context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.