Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TokenHeader in outbound metadata for an authorization token TokenHeader = "authorization" // IDHeader in an outbound metadata for a client ID IDHeader = "uuid" // BearerHeader in an outbound metadata for a bearer token (typically a JWT) BearerHeader = "bearer" )
Variables ¶
This section is empty.
Functions ¶
func NewClientAuth ¶
NewClientAuth for outbound authenticated connections
Types ¶
type Authenticator ¶
type Authenticator interface { Auth(ctx context.Context) error ValidateClientToken(ctx context.Context) (Claims, error) }
Authenticator Auth-s the initial connection then allows validation at any point of the stream
type Claims ¶
type Claims map[string]interface{}
Claims contain information about the VerifiedClientToken
type ClientInterceptor ¶
type ClientInterceptor interface { credentials.PerRPCCredentials Interceptor }
type Interceptor ¶
type Interceptor interface { Stream() grpc.StreamClientInterceptor Unary() grpc.UnaryClientInterceptor }
Click to show internal directories.
Click to hide internal directories.