Documentation ¶
Index ¶
- Variables
- func GetAuthorizationTokenFromMetadata(md metadata.MD) (string, error)
- func GetCtxTokenClaims(ctx context.Context) (jwt.Claims, error)
- func GetCtxTokenString(ctx context.Context) (string, error)
- func GetGCloudAuthorizationTokenFromMetadata(md metadata.MD) (string, error)
- func GetTokenFromMetadata(md metadata.MD, tokenKey string) (string, error)
- func SetCtxTokenClaims(ctx context.Context, claims jwt.Claims) context.Context
- func SetCtxTokenString(ctx context.Context, token string) context.Context
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MissingTokenInContextError = errors.New("missing token in context") UnexpectedTokenTypeInContextError = errors.New("unexpected type in context") MissingTokenClaimsInContextError = errors.New("missing token claims in context") UnexpectedTokenClaimsTypeInContextError = errors.New("unexpected token claims type in context") )
Functions ¶
func GetAuthorizationTokenFromMetadata ¶
GetAuthorizationTokenFromMetadata gets the authorization token from the metadata
func GetCtxTokenClaims ¶
GetCtxTokenClaims gets the token claims from the context
func GetCtxTokenString ¶
GetCtxTokenString gets the token string from the context
func GetGCloudAuthorizationTokenFromMetadata ¶
GetGCloudAuthorizationTokenFromMetadata gets the GCloud authorization token from the metadata
func GetTokenFromMetadata ¶
GetTokenFromMetadata gets the token from the metadata
func SetCtxTokenClaims ¶
SetCtxTokenClaims sets the token claims to the context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.