Documentation ¶
Index ¶
- func BasicFromContext(ctx context.Context) (username string, password string, err error)
- func BearerFromContext(ctx context.Context) (token string, err error)
- func TransferAuthorizationToGRPC(ctx context.Context) context.Context
- func TransferAuthorizationToNewGRPC(ctx context.Context) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicFromContext ¶
BasicFromContext get username and password for basic authorization from context that contains metadata. Username will become lower case.
func BearerFromContext ¶
BearerFromContext get bearer token from context that contains metadata.
func TransferAuthorizationToGRPC ¶
TransferAuthorizationToGRPC will try to get authorization from metadata and transfer into grpc outgoing metadata. Do nothing if there is no authorization found in context.
func TransferAuthorizationToNewGRPC ¶ added in v0.1.2
TransferAuthorizationToNewGRPC will try to get authorization from metadata and transfer into new grpc outgoing metadata. Do nothing if there is no authorization found in context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.