mirror of
https://github.com/distribution/distribution
synced 2024-11-06 19:35:52 +01:00
Merge pull request #1627 from luckyraul/swift_auth_url
Swift auth version param
This commit is contained in:
commit
51d692a29a
@ -69,6 +69,7 @@ type Parameters struct {
|
||||
DomainID string
|
||||
TrustID string
|
||||
Region string
|
||||
AuthVersion int
|
||||
Container string
|
||||
Prefix string
|
||||
InsecureSkipVerify bool
|
||||
@ -174,6 +175,7 @@ func New(params Parameters) (*Driver, error) {
|
||||
ApiKey: params.Password,
|
||||
AuthUrl: params.AuthURL,
|
||||
Region: params.Region,
|
||||
AuthVersion: params.AuthVersion,
|
||||
UserAgent: "distribution/" + version.Version,
|
||||
Tenant: params.Tenant,
|
||||
TenantId: params.TenantID,
|
||||
|
@ -33,6 +33,7 @@ func init() {
|
||||
trustID string
|
||||
container string
|
||||
region string
|
||||
AuthVersion int
|
||||
insecureSkipVerify bool
|
||||
secretKey string
|
||||
accessKey string
|
||||
@ -52,6 +53,7 @@ func init() {
|
||||
trustID = os.Getenv("SWIFT_TRUST_ID")
|
||||
container = os.Getenv("SWIFT_CONTAINER_NAME")
|
||||
region = os.Getenv("SWIFT_REGION_NAME")
|
||||
AuthVersion, _ = strconv.Atoi(os.Getenv("SWIFT_AUTH_VERSION"))
|
||||
insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("SWIFT_INSECURESKIPVERIFY"))
|
||||
secretKey = os.Getenv("SWIFT_SECRET_KEY")
|
||||
accessKey = os.Getenv("SWIFT_ACCESS_KEY")
|
||||
@ -85,6 +87,7 @@ func init() {
|
||||
domainID,
|
||||
trustID,
|
||||
region,
|
||||
AuthVersion,
|
||||
container,
|
||||
root,
|
||||
insecureSkipVerify,
|
||||
|
Loading…
Reference in New Issue
Block a user