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

HttpChallenge rendering is broken if realm parameter is None #1295

Closed
jostick opened this issue Jul 21, 2017 · 3 comments
Closed

HttpChallenge rendering is broken if realm parameter is None #1295

jostick opened this issue Jul 21, 2017 · 3 comments
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted bug help wanted Identifies issues that the core team will likely not have time to work on t:core Issues related to the akka-http-core module t:model Issues around the model classes and its functionality
Milestone

Comments

@jostick
Copy link

jostick commented Jul 21, 2017

A challenge like this

HttpChallenge("Bearer", None, Map("error" ->"invalid_token", "error_description" -> "The access token expired"))

is rendered as
Bearer,error=invalid_token,error_description="The access token expired"

Expected behaviour: The header value should be
Bearer error=invalid_token,error_description="The access token expired"

Realm is not required by RF7235 and even in the constructor the realm is an Option. I'm using akka-http 10.0.9 but HttpChallenge seems to be unchanged in master.

@jrudolph jrudolph added 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted bug help wanted Identifies issues that the core team will likely not have time to work on t:core Issues related to the akka-http-core module t:model Issues around the model classes and its functionality labels Jul 24, 2017
@jrudolph
Copy link
Member

Yes, seems that was changed in https://github.com/akka/akka/pull/21043/files without adding tests for the new case.

@jrudolph
Copy link
Member

Seems simple enough to fix, though. Can you open a PR? Needs a test case in akka-http-core/src/test/scala/akka/http/impl/model/parser/HttpHeaderSpec.scala.

@jostick
Copy link
Author

jostick commented Jul 24, 2017

Yes, I'll make a PR. Probably tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted bug help wanted Identifies issues that the core team will likely not have time to work on t:core Issues related to the akka-http-core module t:model Issues around the model classes and its functionality
Projects
None yet
Development

No branches or pull requests

2 participants