Documentation
¶
Index ¶
- type KMSClient
- type OAuth
- func (o *OAuth) AuthorizationURL(a personalcloudlogs4datatug.Authorization) (string, error)
- func (o *OAuth) Exchange(ctx context.Context, e personalcloudlogs4datatug.Exchange) (personalcloudlogs4datatug.GoogleIdentity, error)
- func (o *OAuth) Refresh(ctx context.Context, refreshToken string) (string, time.Time, error)
- func (o *OAuth) Revoke(ctx context.Context, refreshToken string) error
- type OAuthConfig
- type Vault
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KMSClient ¶
type KMSClient interface {
Encrypt(context.Context, *kmspb.EncryptRequest, ...gax.CallOption) (*kmspb.EncryptResponse, error)
Decrypt(context.Context, *kmspb.DecryptRequest, ...gax.CallOption) (*kmspb.DecryptResponse, error)
}
KMSClient is implemented by Cloud KMS KeyManagementClient. A single service identity with narrow Encrypt/Decrypt permission supplies this client.
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
func NewOAuth ¶
func NewOAuth(config OAuthConfig) (*OAuth, error)
func (*OAuth) AuthorizationURL ¶
func (o *OAuth) AuthorizationURL(a personalcloudlogs4datatug.Authorization) (string, error)
AuthorizationURL accepts only the server-generated state, nonce and S256 challenge.
func (*OAuth) Exchange ¶
func (o *OAuth) Exchange(ctx context.Context, e personalcloudlogs4datatug.Exchange) (personalcloudlogs4datatug.GoogleIdentity, error)
Exchange performs the code exchange on the server and verifies the signed ID token before any Google subject is exposed to the service.
type OAuthConfig ¶
OAuthConfig is supplied only by the server's dedicated Cloud Logs OAuth project. ClientSecret must never be returned to a browser or put in a URL.