-
Notifications
You must be signed in to change notification settings - Fork 245
Support for Google oauth, bearer
header is only in small letters.
#63
Comments
We could certainly open that up to a configuration property. Currently you have to set a custom authenticator in the |
@dsyer I am new to spring. Is there any example I can reference for how to access and change the header from "bearer to Bearer"? |
I'm not aware of any such example. You can easily find out about |
Thanks for your reply. I have figured it out now. I appreciate your advice |
Sounds like you figured out how to do this but in any case this is how I did it (in my case for Facebook but I believe Google has the same problem) Create a class which extends
Then create another class which implements
Finally create a bean for your new UserInfoRestTemplateCustomizer and it should work. |
Thanks so much for your guidance @ryanjbaxter! I my solution is exactly as you describe. I appreciate the validation. Hopefully this helps others who are learning as well. |
No problem. The credit should go to @dsyer who helped me implement it originally :) |
...and then forgot completely about it. Ah well. Thanks, Ryan. |
NP, saw the email and knew exactly when the problem was (for once!) |
This thread is also relevant to WSO2 Identity Server (WSO2 IS) integration, i.e. you'll need to do the same thing. See this class (looks like the relevant WSOS class). Relevant artifacts in my case are WSOS IS 5.0.0 and spring-security-auth2 2.0.8. If you don't do this then you'll bang your head against the "Bearer token missing" message (which irrespective of whether it may be protocol compliant is not helpful in my mind). |
User can set spring.oauth2.resource.tokentype=foo (Bearer is the default). This makes it easier to use SSO with Google and Facebook. Fixes spring-atticgh-63
Hi,
I try to connect spring cloud security and google oauth. Spring security works nice because it allows me to use OAuth authentication by configuration only, but Google do not support the Spring way of sending a header
bearer
in small letters.In such a case is there a possibility to connect :
Bearer
with a capital letter ?Below is prepared example where I was able to get most parts connected.
The remaining part to get a fully functional outcome is a 'Bearer' with a capital letter
So how do you feel about the possibility of setting up a
bearer
header by configuration (eg via file)?It seems to me that this type of change would open the spring-cloud-security for other tools like Google oauth
The text was updated successfully, but these errors were encountered: