Skip to content
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(backend/gitlab): switch prefix of the authorization header from token to bearer #73

Merged
merged 2 commits into from
May 10, 2021

Conversation

d-corler
Copy link
Contributor

@d-corler d-corler commented May 8, 2021

No description provided.

@@ -556,7 +556,7 @@ fn api_headers(auth_token: &Option<String>) -> Result<header::HeaderMap> {
if let Some(token) = auth_token {
headers.insert(
header::AUTHORIZATION,
format!("token {}", token)
format!("bearer {}", token)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it accept lowercase "bearer"? Most expect a capital B

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Gitlab accept it.

But you are right, section 2.1 of RFC6750 states that we should capitalize the prefix. So is as you want.

@jaemk
Copy link
Owner

jaemk commented May 10, 2021

thanks!

@jaemk jaemk merged commit b7c1b24 into jaemk:master May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants