Documentation ¶
Index ¶
- func BasicAuth(user, password string) string
- func ChainedAuthFuncs(fn ...grpc_auth.AuthFunc) grpc_auth.AuthFunc
- func Equals(s1, s2 string) bool
- func NewBasicAuthClientIntereptors(user, password string) interceptors.ClientInterceptors
- func NewBearerClientInterceptors(token string) interceptors.ClientInterceptors
- func NewServerInterceptors(opts ...Option) interceptors.ServerInterceptors
- type BasicValidator
- type Option
- type TokenValidator
- type X509Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBasicAuthClientIntereptors ¶
func NewBasicAuthClientIntereptors(user, password string) interceptors.ClientInterceptors
func NewBearerClientInterceptors ¶
func NewBearerClientInterceptors(token string) interceptors.ClientInterceptors
func NewServerInterceptors ¶
func NewServerInterceptors(opts ...Option) interceptors.ServerInterceptors
Types ¶
type BasicValidator ¶
type Option ¶
type Option func(o *options)
func WithBasicValidators ¶
func WithBasicValidators(validators ...BasicValidator) Option
func WithIgnoredMethods ¶
WithIgnoredMethods bypass auth for the given methods, it takes a list of fully qualified method name, e.g. /helloworld.Greeter/SayHello
func WithMethods ¶
WithMethods change the behaviour to not protect by default, it takes a list of fully qualified method names to protect, e.g. /helloworld.Greeter/SayHello
func WithTokenValidators ¶
func WithTokenValidators(validators ...TokenValidator) Option
func WithX509Validators ¶
func WithX509Validators(validators ...X509Validator) Option
type TokenValidator ¶
Click to show internal directories.
Click to hide internal directories.