Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(middlewares []Middleware) grpc.StreamServerInterceptor
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(middlewares []Middleware) grpc.UnaryServerInterceptor
Types ¶
type AuthenticatedUser ¶
type AuthenticatedUser string
func AuthenticatedUserFromContext ¶
func AuthenticatedUserFromContext(ctx context.Context) AuthenticatedUser
Returns the authorized user name from the context. Must only be called from within a server handler, where the server is configured with the authz interceptors.
type Authenticator ¶
type Authenticator interface {
Authenticate(ctx context.Context) (AuthenticatedUser, error)
}
func NewMTLSAuthenticator ¶
func NewMTLSAuthenticator() Authenticator
type Middleware ¶
func NewMiddleware ¶
func NewMiddleware(authenticator Authenticator) Middleware
Click to show internal directories.
Click to hide internal directories.