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

is there any plan to make use of async and Future ? #8

Closed
arussel opened this issue Mar 24, 2014 · 9 comments
Closed

is there any plan to make use of async and Future ? #8

arussel opened this issue Mar 24, 2014 · 9 comments

Comments

@arussel
Copy link

arussel commented Mar 24, 2014

No description provided.

@tsuyoshizawa
Copy link
Member

You talk about Playframework module?
Yes, there is. We will support returning Future[SimpleResult] by issueAccessToken and authorize both methods.

Expect code:

import scalaoauth2.provider._
object MyController extends Controller with OAuth2Provider {
  def list = Action.async { implicit request =>
    asyncAuthorize(new MyDataHandler()) { authInfo =>
      val user = authInfo.user // User is defined on your system
      // access resource for the user
    }
  }
}

@arussel
Copy link
Author

arussel commented Mar 24, 2014

exactly what I meant 👍
I would be happy to test it as soon as it is pushed

@arussel
Copy link
Author

arussel commented Mar 24, 2014

with the DataHandler having method like:
def createAccessToken(authInfo: AuthInfo[U]): Future[AccessToken]

tsuyoshizawa added a commit that referenced this issue Apr 1, 2014
@tsuyoshizawa
Copy link
Member

I added OAuth2AsyncProvider.

We can use Future from OAuth2Provider to OAuth2AsyncProvider.

@arussel
Copy link
Author

arussel commented Apr 3, 2014

thanks

@arussel
Copy link
Author

arussel commented Apr 17, 2014

Thanks for implementing this feature, any plan to have the DataHandler returns Future too ? my db call to fetch token, authinfo and users are using Future.

@tsuyoshizawa
Copy link
Member

I don't have a plan yet that DataHandler supports Future.

@bwlim
Copy link

bwlim commented Aug 12, 2014

https://github.com/finagle/finagle-oauth2
=> this project seems to implement async version of DataHandler

Why don't you make DataHandler async...?
Somebody like me wants system to be fully async(Reactive System, http://www.reactivemanifesto.org/)
Is there any reason for not implementing async DataHandler?

@tsuyoshizawa
Copy link
Member

Please give us your feedback to #18

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