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

How to use custom Grant Handlers #52

Closed
davidseth opened this issue Jan 20, 2015 · 2 comments
Closed

How to use custom Grant Handlers #52

davidseth opened this issue Jan 20, 2015 · 2 comments

Comments

@davidseth
Copy link

The README has a section on "Customizing Grant Handlers". It has some code that says to create a custom class MyTokenEndpoint which extends TokenEndpoint. Where would I put this code and how would I reference/use it?

Essentially I want to set "clientCredentialRequired = false"

Thanks, David

@tsuyoshizawa
Copy link
Member

Do you extend OAuth2Provider of play2-oauth2-provider to your provider?
Then you can override tokenEndpoint instance field to you implemented TokenEndPoint.

https://github.com/nulab/scala-oauth2-provider/blob/master/play2-oauth2-provider/src/main/scala/scalaoauth2/provider/OAuth2Provider.scala#L16

@davidseth
Copy link
Author

Perfect, Got it working in a few minutes. Awesome framework.

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

2 participants