che-server
che-server copied to clipboard
Skip refresh GitHub tokens, override refresh Azure DevOps token request
What does this PR do?
- Return existed token on GitHub token refresh request. GitHub Oauth tokens do not have expiration date, so no need to refresh them. Refresh token request will fail for such tokens because they do not have
expires_invalue, see: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/refreshing-user-access-tokens#refreshing-a-user-access-token-with-a-refresh-token - Override the
refreshTokenfunction for Azure DevOps. The existed refresh function from theoauth2package fails because Azure DevOps supports POST requests inapplication/x-www-form-urlencodedformat only.
Screenshot/screencast of this PR
What issues does this PR fix or reference?
fixes https://github.com/eclipse-che/che/issues/23028
How to test this PR?
see https://github.com/eclipse-che/che/issues/23028 Same steps are relevant for Azure DevOps
PR Checklist
As the author of this Pull Request I made sure that:
- [ ] The Eclipse Contributor Agreement is valid
- [ ] Code produced is complete
- [ ] Code builds without errors
- [ ] Tests are covering the bugfix
- [ ] The repository devfile is up to date and works
- [ ] Sections
What issues does this PR fix or referenceandHow to test this PRcompleted - [ ] Relevant user documentation updated
- [ ] Relevant contributing documentation updated
- [ ] CI/CD changes implemented, documented and communicated
Reviewers
Reviewers, please comment how you tested the PR when approving it.
/retest
/retest
Verified on Eclipse Che with quay.io/eclipse/che-server:pr-699 - the functionality works properly.
/retest
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: artaleks9, ibuziuk, tolusha, vinokurig
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Build 3.16 :: server_3.x/349: Console, Changes, Git Data
Build 3.16 :: sync-to-downstream_3.x/7308: Console, Changes, Git Data
Build 3.16 :: push-latest-container-to-quay_3.x/4784: Console, Changes, Git Data
Build 3.16 :: get-sources-rhpkg-container-build_3.x/7288:
server : 3.x :: Build 62892456 : quay.io/devspaces/server-rhel8:3.16-9
SUCCESS; copied to quay; /DS_CI/push-latest-container-to-quay_3.x/4784 triggered
Build 3.16 :: update-digests_3.x/7137: Console, Changes, Git Data