Closed tangrufus closed 1 year ago
Defaults type
to http-basic
. No more breaking changes.
For example:
composer_authentications:
- { hostname: default-type.com, username: default-type-username, password: default-type-password }
- { hostname: second.default-type.com/without-password, username: second-default-type-username }
- { type: http-basic, hostname: http-basic.com, username: http-basic-username, password: http-basic-password }
- { type: http-basic, hostname: second.http-basic.com/without-password, username: second-http-basic-username }
- { type: bearer, hostname: bearer.com, token: bearer-token }
- { type: bearer, hostname: second.bearer.com/abc/def, token: second-bearer-token }
- { type: gitlab-oauth, hostname: gitlab.com, token: gitlab-com-oauth-token }
- { type: gitlab-oauth, hostname: gitlab.oauth.org, token: gitlab-oauth-org-token }
- { type: gitlab-token, hostname: gitlab.com, token: gitlab-com-token-token }
- { type: gitlab-token, hostname: gitlab.token.org, token: gitlab-token-org-token }
- { type: github-oauth, hostname: github.com, token: githubcomtoken }
- { type: github-oauth, hostname: you.most.likely.set.this.to.github-com.example, token: youmostlikelysetthistogithubcomexampletoken }
- { type: bitbucket-oauth, hostname: bitbucket.org, consumer_key: bitbucket-org-consumer-key, consumer_secret: bitbucket-org-consumer-secret }
- { type: bitbucket-oauth, hostname: private-bitbucket.com, consumer_key: private-bitbucket-com-consumer-key, consumer_secret: private-bitbucket-com-consumer-secret }
The above example results in the following auth.json
:
{
"http-basic": {
"default-type.com": {
"username": "default-type-username",
"password": "default-type-password"
},
"second.default-type.com/without-password": {
"username": "second-default-type-username",
"password": ""
},
"http-basic.com": {
"username": "http-basic-username",
"password": "http-basic-password"
},
"second.http-basic.com/without-password": {
"username": "second-http-basic-username",
"password": ""
}
},
"bitbucket-oauth": {
"bitbucket.org": {
"consumer-key": "bitbucket-org-consumer-key",
"consumer-secret": "bitbucket-org-consumer-secret"
},
"private-bitbucket.com": {
"consumer-key": "private-bitbucket-com-consumer-key",
"consumer-secret": "private-bitbucket-com-consumer-secret"
}
},
"bearer": {
"bearer.com": "bearer-token",
"second.bearer.com/abc/def": "second-bearer-token"
},
"gitlab-oauth": {
"gitlab.com": "gitlab-com-oauth-token",
"gitlab.oauth.org": "gitlab-oauth-org-token"
},
"gitlab-token": {
"gitlab.com": "gitlab-com-token-token",
"gitlab.token.org": "gitlab-token-org-token"
},
"github-oauth": {
"github.com": "githubcomtoken",
"you.most.likely.set.this.to.github-com.example": "youmostlikelysetthistogithubcomexampletoken"
}
}
Add support for
bearer
gitlab-oauth
,gitlab-token
,github-oauth
andbitbucket-oauth
principlestype
)http-basic
http-basic
http-basic
insteadbearer
)gitlab-oauth
gitlab-token
github-oauth
bitbucket-oauth
Breaking ChangesThis PR contains a breaking change.type
is now required incomposer_authentications
.For example:The above example results in the followingauth.json
:github-oauth
was supported in v0.9.3 but removed in v0.9.6See also: