Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(authFunc AuthFunc) grpc.UnaryServerInterceptor
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
Authenticator is a simple token matching authenticator for grpc/protoc services
func New ¶
func New(token []byte) *Authenticator
func (*Authenticator) Authenticate ¶
type ServiceAuthFuncOverride ¶
type UserMetadata ¶
type UserMetadata struct {
ID string
}
UserMetadata contains metadata about a user.
func GetUserMetadata ¶
func GetUserMetadata(ctx context.Context) (*UserMetadata, bool)
GetUserMetadata can be used to extract user metadata stored in a context.
Click to show internal directories.
Click to hide internal directories.