-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add revoke authorisation implementation for Gitlab #667
Conversation
Could you share api documentation? |
/retest |
/retest |
1 similar comment
/retest |
|
try { | ||
HttpResponse<InputStream> response = | ||
client.send(request, HttpResponse.BodyHandlers.ofInputStream()); | ||
return response.statusCode() == 200; |
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.
What does it return if token not found (already removed) ?
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.
We can not remove an oauth token from Gitlab. If we manually revoke the authorisation from Gitlab, and then execute the revoke action from che dashboard, we will have status code 200.
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.
Tested successfully following test scenario from PR description using GitLab Server.
Screencast:
screencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.03.16-02_00_29.webm
Additional verification has passed as well: no authorization request appeared on new workspace start if not revoke gitlab authorization.
Screencast:
screencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.03.15-17_27_56.webm
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.
I have noticed later, that if revoke authorization and refresh "Git Services" page, it shows "Authorized" status again:
screencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.03.16-02_09_36.webm
@vinokurig : could you please take a look?
@dmytro-ndp That's a known issue: eclipse-che/che#22790 |
@vinokurig : I see. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dmytro-ndp, tolusha, vinokurig The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does this PR do?
Add revoke authorisation implementation for Gitlab.
Screenshot/screencast of this PR
What issues does this PR fix or reference?
eclipse-che/che#22832
How to test this PR?
quay.io/eclipse/che-server:pr-667
.quay.io/eclipse/che-dashboard:pr-1068
.See: The authorisation request appears as it was rejected by the revoke action.
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.