-
-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer Authentication: Add support for bearer
, gitlab-oauth
, gitlab-token
, github-oauth
and bitbucket-oauth
principles
#1413
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bearer
gitlab-oauth
, gitlab-token
, github-oauth
and bitbucket-oauth
principlesbearer
, gitlab-oauth
, gitlab-token
, github-oauth
and bitbucket-oauth
principles
27e3e6d
to
ae6d40f
Compare
swalkinshaw
reviewed
Jul 26, 2022
…itlab-token`, `github-oauth` and `bitbucket-oauth` principles
ae6d40f
to
4c2bb35
Compare
bearer
, gitlab-oauth
, gitlab-token
, github-oauth
and bitbucket-oauth
principlesbearer
, gitlab-oauth
, gitlab-token
, github-oauth
and bitbucket-oauth
principles
Defaults 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 {
"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"
}
}
|
swalkinshaw
approved these changes
Aug 26, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: