Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interceptor ¶
type Interceptor struct {
// contains filtered or unexported fields
}
Interceptor is the interceptor for the authentication
func NewInterceptor ¶
func NewInterceptor( gCloudTokenSource *oauth.TokenSource, logger *slog.Logger, ) (*Interceptor, error)
NewInterceptor creates a new authentication interceptor
Parameters:
- gCloudTokenSource: the GCloud token source to get the access token from
- logger: the logger to use for logging
Returns:
- *Interceptor: the interceptor
- error: an error if the token source or any other error occurs
func (Interceptor) Authenticate ¶
func (i Interceptor) Authenticate() grpc.UnaryClientInterceptor
Authenticate creates a gRPC unary client interceptor for authentication
Returns:
- grpc.UnaryClientInterceptor: the interceptor
Click to show internal directories.
Click to hide internal directories.