-
Notifications
You must be signed in to change notification settings - Fork 162
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
fix(http): allow tokens to exceed 20 chars #207
fix(http): allow tokens to exceed 20 chars #207
Conversation
e6d3fd4
to
f1f7436
Compare
@mapret Thanks for the initial review! Pipeline should be green now. Would you mind to take another look? |
@mapret Care to review again? This library is currently not working for people on our instance |
@max-wittig Looks good to me, but I am not a maintainer of this project, I am just the one who opened the related issue on our internal GitLab 😉. |
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 think it would be better to distinguish between bearer token and PAT via two properties.
That way the switch can go away and there will be no need to throw exception.
FYI you can write the same if statements as a switch case, so there was no need to change the entire signature.
@jetersen thanks for the review. What do you mean by |
I came across this pull request because I encountered the same issue and I'm very interested that this issues is fixed as soon as possible. So I would like to help, but unfortunately I don't understand either exactly how @jetersen imagined it with properties. @jetersen Could you explain this in more detail? |
GitLab allows users of an instance to specify a token prefix since 13.8, which is where this current assumption breaks down See: https://docs.gitlab.com/ee/user/admin_area/settings/account_and_limit_settings.html#personal-access-token-prefix
f1f7436
to
575c2fd
Compare
@jetersen Using switch again now. Could you please take another look? |
Allow GitLab access tokens longer than 20 characters to be used (when custom prefix is configured on a GitLab instance) Pull-Request: #247 See-Also: https://docs.gitlab.com/ee/user/admin_area/settings/account_and_limit_settings.html#personal-access-token-prefix See-Also: nmklotas/GitLabApiClient#207 See-Also: nmklotas/GitLabApiClient#204
released in 1.8.0 |
GitLab allows users of an instance to specify a token prefix since 13.8, which is where this current assumption breaks down
See: https://docs.gitlab.com/ee/user/admin_area/settings/account_and_limit_settings.html#personal-access-token-prefix