Documentation
¶
Index ¶
- Constants
- type Factory
- type OCICredentials
- func (c *OCICredentials) GetConfigurationProvider() common.ConfigurationProvider
- func (c *OCICredentials) GetRegion() string
- func (c *OCICredentials) IsExpired() bool
- func (c *OCICredentials) Provider() auth.Provider
- func (c *OCICredentials) Refresh(ctx context.Context) error
- func (c *OCICredentials) SignRequest(ctx context.Context, req *http.Request) error
- func (c *OCICredentials) Token(ctx context.Context) (string, error)
- func (c *OCICredentials) Type() auth.AuthType
- type OCIHTTPClient
- type UserPrincipalConfig
Constants ¶
const ( DefaultConfigPath = "~/.oci/config" DefaultProfile = "DEFAULT" )
Default values for OCI configuration
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory creates OCI credentials
func NewFactory ¶
NewFactory creates a new OCI auth factory
func (*Factory) SupportedAuthTypes ¶
SupportedAuthTypes returns supported OCI auth types
type OCICredentials ¶
type OCICredentials struct {
// contains filtered or unexported fields
}
OCICredentials implements auth.Credentials for OCI
func (*OCICredentials) GetConfigurationProvider ¶
func (c *OCICredentials) GetConfigurationProvider() common.ConfigurationProvider
GetConfigurationProvider returns the underlying OCI configuration provider
func (*OCICredentials) GetRegion ¶
func (c *OCICredentials) GetRegion() string
GetRegion returns the configured region
func (*OCICredentials) IsExpired ¶
func (c *OCICredentials) IsExpired() bool
IsExpired checks if credentials are expired
func (*OCICredentials) Provider ¶
func (c *OCICredentials) Provider() auth.Provider
Provider returns the provider type
func (*OCICredentials) Refresh ¶
func (c *OCICredentials) Refresh(ctx context.Context) error
Refresh refreshes the credentials if needed
func (*OCICredentials) SignRequest ¶
SignRequest signs an HTTP request with OCI auth headers
func (*OCICredentials) Token ¶
func (c *OCICredentials) Token(ctx context.Context) (string, error)
Token returns an access token if applicable
func (*OCICredentials) Type ¶
func (c *OCICredentials) Type() auth.AuthType
Type returns the authentication type
type OCIHTTPClient ¶
type OCIHTTPClient struct {
// contains filtered or unexported fields
}
OCIHTTPClient creates an HTTP client with OCI authentication
func NewOCIHTTPClient ¶
func NewOCIHTTPClient(credentials *OCICredentials) *OCIHTTPClient
NewOCIHTTPClient creates a new HTTP client with OCI auth
type UserPrincipalConfig ¶
type UserPrincipalConfig struct { // ConfigPath is the path to the OCI configuration file ConfigPath string `mapstructure:"config_path" json:"config_path"` // Profile is the profile name within the configuration file Profile string `mapstructure:"profile" json:"profile"` // UseSessionToken enables session token authentication UseSessionToken bool `mapstructure:"use_session_token" json:"use_session_token"` }
UserPrincipalConfig encapsulates configuration for user principal authentication. This method uses API key-based authentication with OCI configuration files.
func (*UserPrincipalConfig) ApplyEnvironment ¶
func (c *UserPrincipalConfig) ApplyEnvironment()
ApplyEnvironment applies environment variables and defaults to the configuration
func (UserPrincipalConfig) Validate ¶
func (c UserPrincipalConfig) Validate() error
Validate validates the user principal configuration