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

Support changing Authorization Http Header name #50

Closed
osafi opened this issue May 3, 2018 · 5 comments
Closed

Support changing Authorization Http Header name #50

osafi opened this issue May 3, 2018 · 5 comments
Assignees
Labels
enhancement This issue/PR is an enhancement or new feature.

Comments

@osafi
Copy link
Contributor

osafi commented May 3, 2018

Hi,
In our organization the token is expected to be in a different header than the standard 'Authorization'. Having support for changing the Http Header name as well would be helpful (similar to #45 ).

I have implemented this already and can submit the PR for consideration if this feature request is acceptable

Thanks

@osafi osafi changed the title Change Authorization Http Header name Support chaning Authorization Http Header name May 3, 2018
@osafi osafi changed the title Support chaning Authorization Http Header name Support changing Authorization Http Header name May 3, 2018
@mauriciovigolo
Copy link
Owner

@osafi, first of all, thanks for contributing to the project!

I have a question about this feature: isn't the Authorization header a default value for Http and for keycloak?

@osafi
Copy link
Contributor Author

osafi commented May 5, 2018

@mauriciovigolo, yes Authorization is the standard for Http. Unfortunately the services our SPA needs to call use a different header for authentication.
The suggested change is to default to Authorization but have the option to change it.

Requests to Keycloak would continue to use the default Authorization header as it is hard coded in keycloak.js

Happy to contribute, thanks for the great project!

@mauriciovigolo
Copy link
Owner

mauriciovigolo commented May 9, 2018

@osafi, this feature certainly may help others with the same situation you are facing.

Thanks for PR #54! Great to have your contribution!

PS: This will be shipped on release 6.0.0, okay?

mauriciovigolo added a commit that referenced this issue May 9, 2018
feat: issue #50, change authorization header name
@mauriciovigolo mauriciovigolo added the enhancement This issue/PR is an enhancement or new feature. label May 9, 2018
@mauriciovigolo mauriciovigolo added this to the v.6.0.0 milestone May 9, 2018
mauriciovigolo added a commit that referenced this issue May 15, 2018
- Added contribution from @osafi, related to Issue #50.
- Included option to disable the KeycloakBearerInterceptor as issue #58
@mauriciovigolo mauriciovigolo moved this from To Do to Done in keycloak-angular v. 4.0.0 May 18, 2018
mauriciovigolo added a commit that referenced this issue May 21, 2018
- This commit includes the work done in milestone v.4.0.0.
- Milestone v.4.0.0 includes the following issues:
#47, #50, #51, #52, #56, #58 and #61
@satyaram413
Copy link

Hi @mauriciovigolo,
So I used your Angular repo, and integrated with my application, and now i see there is a key called Authorization in my request header, but however my api accepts access_token as key and value of access_token, how can i change my request header key? Please help

@satyaram413
Copy link

Hi @mauriciovigolo ,
there is only a declared class of KeyCloak in service file, if I change my header name in keycloak.js then when I push my code on someother environment, this will cause a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR is an enhancement or new feature.
Projects
No open projects
Development

No branches or pull requests

3 participants