Documentation ¶
Overview ¶
Package mpahooks provides grpc interceptors and other helpers for implementing MPA.
Index ¶
- func ActionMatchesInput(action *mpa.Action, input *rpcauth.RPCAuthInput) error
- func MPAFromIncomingContext(ctx context.Context) (mpaID string, ok bool)
- func StreamClientIntercepter() grpc.StreamClientInterceptor
- func UnaryClientIntercepter() grpc.UnaryClientInterceptor
- func WithMPAInMetadata(ctx context.Context, mpaID string) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionMatchesInput ¶
func ActionMatchesInput(action *mpa.Action, input *rpcauth.RPCAuthInput) error
ActionMatchesInput returns an error if an MPA action doesn't match the message being checked in the RPCAuthInput.
func MPAFromIncomingContext ¶
MPAFromIncomingContext reads a MPA ID from the grpc metadata of an incoming RPC call
func StreamClientIntercepter ¶
func StreamClientIntercepter() grpc.StreamClientInterceptor
StreamClientIntercepter is a grpc.StreamClientInterceptor that will perform the MPA flow.
func UnaryClientIntercepter ¶
func UnaryClientIntercepter() grpc.UnaryClientInterceptor
UnaryClientIntercepter is a grpc.UnaryClientIntercepter that will perform the MPA flow.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.