Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendUserInfoToContext ¶ added in v0.51.0
AppendUserInfoToContext appends the user info to the context.
func CarryMetadata ¶ added in v0.39.0
CarryMetadata extracts relevant metadata from the incoming context and append that to the outgoing context.
func HeaderMatcher ¶ added in v0.34.0
HeaderMatcher is a custom header matcher for GRPC gateway.
Types ¶
type Config ¶ added in v0.43.0
type Config struct {
RBACServerAddr string
// AccessResource is the static resource name to access. This value or GetAccessResource functions must be set.
AccessResource string
// GetAccessResourceForGRPCRequest is a function to get the resource name from a gRPC method.
GetAccessResourceForGRPCRequest func(fullMethod string) string
// GetAccessResourceForHTTPRequest is a function to get the resource name from an HTTP request method and URL.
GetAccessResourceForHTTPRequest func(method string, url url.URL) string
}
Config is the configuration for an Interceptor.
type Interceptor ¶
type Interceptor struct {
// contains filtered or unexported fields
}
Interceptor is an authentication interceptor.
func NewInterceptor ¶
func NewInterceptor(ctx context.Context, c Config) (*Interceptor, error)
NewInterceptor creates a new Interceptor.
func (*Interceptor) InterceptHTTPRequest ¶ added in v0.22.0
InterceptHTTPRequest intercepts an HTTP request and returns an HTTP status code.
func (*Interceptor) Unary ¶
func (a *Interceptor) Unary() grpc.UnaryServerInterceptor
Unary returns a unary server interceptor.
Click to show internal directories.
Click to hide internal directories.