Documentation
¶
Index ¶
- type FileTokenSource
- type OauthConfig
- func (oauthConfig *OauthConfig) DeduceFlow() OauthFlow
- func (oauthConfig *OauthConfig) GetTokenSource() credentials.PerRPCCredentials
- func (oauthConfig *OauthConfig) IsAuthorizationCode() bool
- func (oauthConfig *OauthConfig) IsClientCredentials() bool
- func (oauthConfig *OauthConfig) IsEnabled() bool
- type OauthFlow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileTokenSource ¶
func (FileTokenSource) GetRequestMetadata ¶
func (fileTokenSource FileTokenSource) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
GetRequestMetadata gets the request metadata as a map from a TokenSource.
func (FileTokenSource) RequireTransportSecurity ¶
func (fileTokenSource FileTokenSource) RequireTransportSecurity() bool
RequireTransportSecurity indicates whether the credentials requires transport security.
type OauthConfig ¶
type OauthConfig struct {
ClientId string
ClientSecret string
AuthServer string
CallbackPort int32
CredentialsLocation string
}
func (*OauthConfig) DeduceFlow ¶
func (oauthConfig *OauthConfig) DeduceFlow() OauthFlow
Implicit configurations instead of explicitly set the desired flow ClientCredentials needs ClientId and ClientSecret AuthorizationCode only needs ClientId AuthServer is always mandatory
func (*OauthConfig) GetTokenSource ¶
func (oauthConfig *OauthConfig) GetTokenSource() credentials.PerRPCCredentials
Returns an object that implements:
type PerRPCCredentials interface {
GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
RequireTransportSecurity() bool
}
func (*OauthConfig) IsAuthorizationCode ¶
func (oauthConfig *OauthConfig) IsAuthorizationCode() bool
func (*OauthConfig) IsClientCredentials ¶
func (oauthConfig *OauthConfig) IsClientCredentials() bool
func (*OauthConfig) IsEnabled ¶
func (oauthConfig *OauthConfig) IsEnabled() bool
Click to show internal directories.
Click to hide internal directories.