Documentation
¶
Overview ¶
Package server2serverauth is used for sending gRPC requests between Google Cloud hosted services (like Cloud Run instances).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IncomingTokenPayload ¶
type IncomingTokenPayload struct {
// contains filtered or unexported fields
}
IncomingTokenPayload is data embedded in the token that has been validated by a trusted authority (typically Google).
func (*IncomingTokenPayload) Email ¶
func (p *IncomingTokenPayload) Email() string
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
func NewSender ¶
NewSender returns a new object used for sending authenticating information to another server.
func (*Sender) AddTokenToOutgoingContext ¶
AddTokenToOutgoingContext returns a new context.Context with an ("Authorozation", "Bearer xxxx") header in the gRPC metadata.
func (*Sender) PerRPCCredentials ¶
func (p *Sender) PerRPCCredentials() credentials.PerRPCCredentials
PerRPCCredentials returns a new context.Context with an ("Authorozation", "Bearer xxxx") header in the gRPC metadata.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator is used for validating requests coming from other servers.
func NewValidator ¶
NewValidator constructs a Validator for use by a server that needs to validate other servers.
func (*Validator) ValidateFromIncomingContext ¶
func (v *Validator) ValidateFromIncomingContext(ctx context.Context) (*IncomingTokenPayload, error)
ValidateFromIncomingContext extracts a validated payload from the gRPC metadata of an incoming request.