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 optional parameters for login #175

Open
tototoshi opened this issue Jun 13, 2016 · 0 comments
Open

Support optional parameters for login #175

tototoshi opened this issue Jun 13, 2016 · 0 comments

Comments

@tototoshi
Copy link
Contributor

Currently, OAuth2Controller#login and OAuth2Controller#link doesn't support optional parameters.

// TODO scope is optional in some services
// TODO some services have more optional parameter
def login(scope: String) = AsyncStack(ExecutionContextKey -> OAuthExecutionContext) { implicit request =>

  // TODO scope is optional in some services
  // TODO some services have more optional parameter
  def login(scope: String) = AsyncStack(ExecutionContextKey -> OAuthExecutionContext) { implicit request =>

To solve this problem, I think some changes (including API changes) is required. My idea is:

  • Remove the scope argument because scope is optional
  • OAuth2Authenticator#getAuthorizationUrl should take request instead of scope

The task of login is only redirecting to authorization url, so it is enough only to change the API of OAuth2Authenticator#getAuthorizationUrl. is this correct?

tototoshi pushed a commit to tototoshi/play2-auth that referenced this issue Jul 12, 2016
tototoshi pushed a commit to tototoshi/play2-auth that referenced this issue Jul 14, 2016
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

1 participant