credential

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHotReloadTLSFromFile

func NewHotReloadTLSFromFile(certFile, keyFile string) credentials.TransportCredentials

Types

type JwtCreds

type JwtCreds struct {
	// contains filtered or unexported fields
}

func NewJwtCreds

func NewJwtCreds(ident string) *JwtCreds

func (*JwtCreds) GetRequestMetadata

func (j *JwtCreds) GetRequestMetadata(ctx context.Context, in ...string) (md map[string]string, err error)

GetRequestMetadata returns the metadata required to interact with the gRPC server. The token isn't included if it's not set.

func (*JwtCreds) RequireTransportSecurity

func (j *JwtCreds) RequireTransportSecurity() bool

RequireTransportSecurity will always return false, for now we'll assume that the service is behind a reverse-proxy with a certificate.

func (*JwtCreds) SetToken

func (j *JwtCreds) SetToken(token string)

SetToken provides the ability to set the token at a later stage e.g. after retrieving it from the Auth() call in the `/runner.RunnerService/Auth`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL