Documentation ¶
Index ¶
Constants ¶
View Source
const ( // OAuth2TokenContextKey holds the key used to store an OAuth2 Token in the context. OAuth2IntrospectionContextKey contextKey = "OAuth2Introspection" SubjectContextKey contextKey = "Subject" TokenContextKey contextKey = "Token" )
Variables ¶
This section is empty.
Functions ¶
func FromGRPCContext ¶
func FromGRPCContext() grpc.ClientRequestFunc
FromGRPCContext moves OAuth2 token from context to gRPC metadata. Particularly useful for clients.
func FromHTTPContext ¶
func FromHTTPContext() http.RequestFunc
FromHTTPContext moves OAuth2 token from context to request header. Particularly useful for clients.
func New ¶
func New(introspector hoauth2.Introspector, scopes ...string) endpoint.Middleware
func ToGRPCContext ¶
func ToGRPCContext() grpc.ServerRequestFunc
ToGRPCContext moves OAuth2 token from gRPC metadata to context. Particularly useful for servers.
func ToHTTPContext ¶
func ToHTTPContext() http.RequestFunc
ToHTTPContext moves OAuth2 token from request header to context. Particularly useful for servers.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.