Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
type credentialType string

type Credentials struct {
STACKIT_SERVICE_ACCOUNT_EMAIL string
STACKIT_SERVICE_ACCOUNT_EMAIL string // Deprecated: ServiceAccountEmail is not required and will be removed after 12th June 2025.
STACKIT_SERVICE_ACCOUNT_TOKEN string
STACKIT_SERVICE_ACCOUNT_KEY_PATH string
STACKIT_PRIVATE_KEY_PATH string
Expand Down Expand Up @@ -246,6 +246,8 @@ func readCredential(cred credentialType, credentials *Credentials) (string, erro

// getServiceAccountEmail searches for an email in the following order: client configuration, environment variable, credentials file.
// is not required for authentication, so it can be empty.
//
// Deprecated: ServiceAccountEmail is not required and will be removed after 12th June 2025.
func getServiceAccountEmail(cfg *config.Configuration) string {
if cfg.ServiceAccountEmail != "" {
return cfg.ServiceAccountEmail
Expand Down
1 change: 1 addition & 0 deletions core/clients/token_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type TokenFlow struct {

// TokenFlowConfig is the flow config
type TokenFlowConfig struct {
// Deprecated: ServiceAccountEmail is not required and will be removed after 12th June 2025.
ServiceAccountEmail string
ServiceAccountToken string
// Deprecated: retry options were removed to reduce complexity of the client. If this functionality is needed, you can provide your own custom HTTP client.
Expand Down
5 changes: 3 additions & 2 deletions core/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type Configuration struct {
UserAgent string `json:"userAgent,omitempty"`
Debug bool `json:"debug,omitempty"`
NoAuth bool `json:"noAuth,omitempty"`
ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` // Deprecated: ServiceAccountEmail is not required and will be removed after 12th June 2025.
Token string `json:"token,omitempty"`
ServiceAccountKey string `json:"serviceAccountKey,omitempty"`
PrivateKey string `json:"privateKey,omitempty"`
Expand Down Expand Up @@ -176,6 +176,8 @@ func WithTokenEndpoint(url string) ConfigurationOption {
}

// WithServiceAccountEmail returns a ConfigurationOption that sets the service account email
//
// Deprecated: WithServiceAccountEmail is not required and will be removed after 12th June 2025.
func WithServiceAccountEmail(serviceAccountEmail string) ConfigurationOption {
return func(config *Configuration) error {
config.ServiceAccountEmail = serviceAccountEmail
Expand Down Expand Up @@ -319,7 +321,6 @@ func WithCustomConfiguration(cfg *Configuration) ConfigurationOption {
config.NoAuth = cfg.NoAuth
config.Token = cfg.Token
config.ServiceAccountKey = cfg.ServiceAccountKey
config.ServiceAccountEmail = cfg.ServiceAccountEmail
config.ServiceAccountKeyPath = cfg.ServiceAccountKeyPath
config.PrivateKey = cfg.PrivateKey
config.PrivateKeyPath = cfg.PrivateKeyPath
Expand Down
Loading