Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticatingInterceptor ¶
func AuthenticatingInterceptor(a Authenticator) grpc_auth.AuthFunc
Types ¶
type AuthenticatedUser ¶
func AuthInfoFromContext ¶
func AuthInfoFromContext(ctx context.Context) AuthenticatedUser
AuthInfoFromContext extracts authenticated user info from the ctx.
type Authenticator ¶
type Authenticator interface {
Authenticate(rpcCtx context.Context) (AuthenticatedUser, error)
}
type MockAuthenticator ¶
type MockAuthenticator struct {
F func(context.Context) (AuthenticatedUser, error)
}
func (MockAuthenticator) Authenticate ¶
func (m MockAuthenticator) Authenticate(ctx context.Context) (AuthenticatedUser, error)
Click to show internal directories.
Click to hide internal directories.