Versions in this module Expand all Collapse all v1 v1.0.1 Feb 21, 2024 v1.0.0 Feb 21, 2024 Changes in this version + const DefaultAuthorizationHeader + const DefaultClientID + const ProxyAuthorizationHeader + var DefaultClientSecretLocation = filepath.Join(string(filepath.Separator), "etc", "secrets", "client_secret") + func GetAdditionalAdminClientConfigOptions(cfg *Config) []grpc.DialOption + func GetDeviceFlowAuthTokenSource(ctx context.Context, deviceFlowOrchestrator deviceflow.TokenOrchestrator) (oauth2.TokenSource, error) + func GetPKCEAuthTokenSource(ctx context.Context, pkceTokenOrchestrator pkce.TokenOrchestrator) (oauth2.TokenSource, error) + func GetProxyTokenSource(ctx context.Context, cfg *Config) (oauth2.TokenSource, error) + func InitializeAdminClient(ctx context.Context, cfg *Config, opts ...grpc.DialOption) service.AdminServiceClient + func InitializeAuthMetadataClient(ctx context.Context, cfg *Config, ...) (client service.AuthMetadataServiceClient, err error) + func InitializeMockAdminClient() service.AdminServiceClient + func MaterializeCredentials(ctx context.Context, cfg *Config, tokenCache cache.TokenCache, ...) error + func MaterializeProxyAuthCredentials(ctx context.Context, cfg *Config, ...) error + func NewAdminClient(ctx context.Context, conn *grpc.ClientConn) service.AdminServiceClient + func NewAdminConnection(ctx context.Context, cfg *Config, ...) (*grpc.ClientConn, error) + func NewAuthInterceptor(cfg *Config, tokenCache cache.TokenCache, ...) grpc.UnaryClientInterceptor + func NewProxyAuthInterceptor(cfg *Config, proxyCredentialsFuture *PerRPCCredentialsFuture) grpc.UnaryClientInterceptor + func SetConfig(cfg *Config) error + type AuthType uint8 + const AuthTypeClientSecret + const AuthTypeDeviceFlow + const AuthTypeExternalCommand + const AuthTypePkce + func AuthTypeString(s string) (AuthType, error) + func AuthTypeValues() []AuthType + func (i *AuthType) UnmarshalJSON(data []byte) error + func (i *AuthType) UnmarshalYAML(unmarshal func(interface{}) error) error + func (i AuthType) IsAAuthType() bool + func (i AuthType) MarshalJSON() ([]byte, error) + func (i AuthType) MarshalYAML() (interface{}, error) + func (i AuthType) String() string + type ClientCredentialsTokenSourceProvider struct + func (p ClientCredentialsTokenSourceProvider) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) + type Clientset struct + func InitializeMockClientset() *Clientset + func (c Clientset) AdminClient() service.AdminServiceClient + func (c Clientset) AuthMetadataClient() service.AuthMetadataServiceClient + func (c Clientset) DataProxyClient() service.DataProxyServiceClient + func (c Clientset) HealthServiceClient() grpc_health_v1.HealthClient + func (c Clientset) IdentityClient() service.IdentityServiceClient + func (c Clientset) SignalServiceClient() service.SignalServiceClient + type ClientsetBuilder struct + func ClientSetBuilder() *ClientsetBuilder + func NewClientsetBuilder() *ClientsetBuilder + func (cb *ClientsetBuilder) Build(ctx context.Context) (*Clientset, error) + func (cb *ClientsetBuilder) WithConfig(config *Config) *ClientsetBuilder + func (cb *ClientsetBuilder) WithDialOptions(opts ...grpc.DialOption) *ClientsetBuilder + func (cb *ClientsetBuilder) WithTokenCache(tokenCache cache.TokenCache) *ClientsetBuilder + type Config struct + Audience string + AuthType AuthType + AuthorizationHeader string + CACertFilePath string + ClientID string + ClientSecretEnvVar string + ClientSecretLocation string + Command []string + DefaultServiceConfig string + DeprecatedAuthorizationServerURL string + DeprecatedUseAuth bool + DeviceFlowConfig deviceflow.Config + Endpoint config.URL + HTTPProxyURL config.URL + InsecureSkipVerify bool + MaxBackoffDelay config.Duration + MaxRetries int + PerRetryTimeout config.Duration + PkceConfig pkce.Config + ProxyCommand []string + Scopes []string + TokenRefreshWindow config.Duration + TokenURL string + UseAudienceFromAdmin bool + UseInsecureConnection bool + func GetConfig(ctx context.Context) *Config + func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet + type CustomHeaderTokenSource struct + func NewCustomHeaderTokenSource(source oauth2.TokenSource, insecure bool, customHeader string) CustomHeaderTokenSource + func (ts CustomHeaderTokenSource) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) + func (ts CustomHeaderTokenSource) RequireTransportSecurity() bool + type DeviceFlowTokenSourceProvider struct + func (p DeviceFlowTokenSourceProvider) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) + type ExternalTokenSourceProvider struct + func (e ExternalTokenSourceProvider) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) + type PKCETokenSourceProvider struct + func (p PKCETokenSourceProvider) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) + type PerRPCCredentialsFuture struct + func NewPerRPCCredentialsFuture() *PerRPCCredentialsFuture + func (ts *PerRPCCredentialsFuture) Get() credentials.PerRPCCredentials + func (ts *PerRPCCredentialsFuture) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) + func (ts *PerRPCCredentialsFuture) IsInitialized() bool + func (ts *PerRPCCredentialsFuture) RequireTransportSecurity() bool + func (ts *PerRPCCredentialsFuture) Store(tokenSource credentials.PerRPCCredentials) + type TokenSource interface + Token func() (*oauth2.Token, error) + type TokenSourceProvider interface + GetTokenSource func(ctx context.Context) (oauth2.TokenSource, error) + func NewClientCredentialsTokenSourceProvider(ctx context.Context, cfg *Config, scopes []string, tokenURL string, ...) (TokenSourceProvider, error) + func NewDeviceFlowTokenSourceProvider(baseTokenOrchestrator tokenorchestrator.BaseTokenOrchestrator, ...) (TokenSourceProvider, error) + func NewExternalTokenSourceProvider(command []string) (TokenSourceProvider, error) + func NewPKCETokenSourceProvider(baseTokenOrchestrator tokenorchestrator.BaseTokenOrchestrator, ...) (TokenSourceProvider, error) + func NewTokenSourceProvider(ctx context.Context, cfg *Config, tokenCache cache.TokenCache, ...) (TokenSourceProvider, error)