Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(v Authenticator) grpc.StreamServerInterceptor
StreamServerInterceptor returns a new streaming server interceptor that authenticates incoming messages.
The stage at which unauthenticated messages will be rejected with `PermissionDenied` varies based on the type of the RPC. For `ServerStream` (1:m) requests, it will happen before reaching any userspace handlers. For `ClientStream` (n:1) or `BidiStream` (n:m) RPCs, the messages will be rejected on calls to `stream.Recv()`.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(v Authenticator) grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptor that authenticates incoming messages.
Invalid messages will be rejected with `PermissionDenied` before reaching any userspace handlers.
Types ¶
type Authenticator ¶
type Authenticator interface {
Authenticate(ctx context.Context, level proto.TokenLevel) error
}
Server authenticator interface.
type GatewayHandler ¶
type Implementor ¶
type Implementor interface {
TokenRequired(fullPath string) proto.TokenLevel
}
gRPC implementor interface.
type Service ¶
type Service interface { ScopedGRPCServer(scope proto.VisibleScope) []*grpc.Server RegisterGateway(scope proto.VisibleScope, handlers ...GatewayHandler) error }