mpahooks

package
v1.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package mpahooks provides grpc interceptors and other helpers for implementing MPA.

Index

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

func MPAFromIncomingContext(ctx context.Context) (mpaID string, ok bool)

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.

func WithMPAInMetadata

func WithMPAInMetadata(ctx context.Context, mpaID string) context.Context

WithMPAInMetadata adds a MPA ID to the grpc metadata of an outgoing RPC call

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL