Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UnauthenticatedMethods specify gRPC methods that should not be authenticated. // This means they can be call publicly. UnauthenticatedMethods = []string{ "/authz.Api/Authenticate", "/authz.Api/Check", } )
Functions ¶
func AuthenticationStreamClientInterceptor ¶
func AuthenticationStreamClientInterceptor(authenticator Authenticator) grpc.StreamClientInterceptor
func AuthenticationUnaryClientInterceptor ¶
func AuthenticationUnaryClientInterceptor(authenticator Authenticator) grpc.UnaryClientInterceptor
Types ¶
type Authenticator ¶
type Authenticator interface { GetClientID() string GetClientSecret() string GetExpireDelay() time.Duration GetToken() *Token SetToken(token *Token) }
func NewAuthenticator ¶
func NewAuthenticator(clientID string, clientSecret string, options ...AuthenticatorOption) Authenticator
type AuthenticatorOption ¶
type AuthenticatorOption func(*authenticatorOptions)
func WithExpireDelay ¶
func WithExpireDelay(delay time.Duration) AuthenticatorOption
Click to show internal directories.
Click to hide internal directories.