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

use both Authorization Grant CC and ROPC with same tokenEndpoint #33

Open
mike-aungsan opened this issue May 28, 2015 · 3 comments
Open

Comments

@mike-aungsan
Copy link

Hi,

I would like to use both Authorization Grant CC and ROPC with same tokenEndpoint.

restifyOAuth2.cc(server, {tokenEndpoint: "/token", hooks: restifyOAuth2Hooks});

restifyOAuth2.ropc(server, {tokenEndpoint: "/token", hooks: restifyOAuth2RopcHooks});

What is the best way to setup or patch?

Regards,

@gmaniac
Copy link
Collaborator

gmaniac commented May 29, 2015

I would recommend keeping those separate routes and adding another route to generate them both at the same time. You will need to change up the hooks file to support both ropc and cc. For generating the ropc token call grantUserToken and for cc call grantClientToken.

This will allow you to do one or the other or both, depending on the situation. If you would like some examples let me know. I will look into if we should add this in.

@mike-aungsan
Copy link
Author

I would like to use both at the same time. I do this, but it does not work. Probably due to the way makeSetup run.

restifyOAuth2.cc(server, {tokenEndpoint: "/token", hooks: restifyOAuth2Hooks});
restifyOAuth2.ropc(server, {tokenEndpoint: "/user_token", hooks: restifyOAuth2HooksRopc});

Could you show me some example?
Many Thanks

@mgara
Copy link

mgara commented Jul 7, 2017

Any updates related to this issue ?
Thanks.

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

No branches or pull requests

3 participants