Documentation
¶
Overview ¶
Package grpc contains IAM authentication interceptors for gRPC servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BearerToken ¶
BearerToken extracts authorization: Bearer token from incoming metadata.
func StreamServerInterceptor ¶
func StreamServerInterceptor(auth sdk.Authenticator, opts ...Option) googlegrpc.StreamServerInterceptor
StreamServerInterceptor authenticates streaming gRPC calls and stores Principal in the stream context.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(auth sdk.Authenticator, opts ...Option) googlegrpc.UnaryServerInterceptor
UnaryServerInterceptor authenticates unary gRPC calls and stores Principal in the handler context.
Types ¶
type Option ¶
type Option func(*options)
Option customizes gRPC interceptors.
func WithTokenExtractor ¶
func WithTokenExtractor(extractor TokenExtractor) Option
WithTokenExtractor overrides the default authorization metadata extractor.