Documentation ¶
Index ¶
Constants ¶
View Source
const AuthenticationHeader = "authorization"
AuthenticationHeader declares the standard header that should contain authentication data such as a token, key, etc.
Variables ¶
This section is empty.
Functions ¶
func NewGRPCAuthenticationInterceptor ¶
func NewGRPCAuthenticationInterceptor( token string, ) grpc.UnaryServerInterceptor
NewGRPCAuthenticationInterceptor creates an interceptor for GRPC requests. It checks for the presence of AuthenticationHeader and verifies that the token matches the parameter set in the constructor.
func NewRESTErrorHandler ¶
func NewRESTErrorHandler(logger glog.Logger) runtime.ServeMuxOption
NewRESTErrorHandler replaces the default error handler of the package github.com/grpc-ecosystem/grpc-gateway/v2/runtime with a custom one that logs errors and modifies the header behavior.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.