Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckToken ¶
CheckToken checks the 'authentication' header of incoming gRPC metadata in ctx. It returns nil if and only if the token matches secret.
func RPCCredentialsV2 ¶
func RPCCredentialsV2(sharedSecret string) credentials.PerRPCCredentials
RPCCredentialsV2 can be used with grpc.WithPerRPCCredentials to create a grpc.DialOption that inserts an V2 (HMAC) token with the current timestamp for authentication with a Gitaly server. The shared secret must match the one used on the Gitaly server.
func SetTokenValidityDuration ¶
SetTokenValidityDuration changes the duration for which any token will be valid. It only applies to newly created tokens.
func TokenValidityDuration ¶
TokenValidityDuration returns the duration for which any token will be valid. This is currently only used by our testing infrastructure.
Types ¶
Click to show internal directories.
Click to hide internal directories.