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

Authorization Code flow implemented? #5

Open
andrewclink opened this issue Jan 16, 2017 · 1 comment
Open

Authorization Code flow implemented? #5

andrewclink opened this issue Jan 16, 2017 · 1 comment

Comments

@andrewclink
Copy link

I need to use an auth code grant in my application. I can generate a auth code ok and pass that back, but when the client attempts to obtain a token invalid_grant! is called in generators/token.rb:43 because it cannot find a strategy for 'authorization_code'.

Adding Grape::OAuth2::Strategies::AuthorizationCode to the STRATEGY_CLASSES table fixes that, but it appears to expect a different type of Rack Request and Response.

  • The arity is different on ::AuthorizationCode's process method
  • The request doesn't implement verify_redirect_uri! (Rack::OAuth2::Server::Authorize::Request does, but the request is of an AuthorizationCode type)
  • The response passed is a Rack::OAuth2::Server::Token::Response, which doesn't implement approve!

If I'm doing something wrong, please let me know. Otherwise, is this just something that needs to be implemented further?

@nbulaj
Copy link
Member

nbulaj commented Jan 24, 2017

Hi @andrewclink . Currently Authorization Code flow is not implemented (just a stub) and I need some help with it. I will take a look at this a little bit later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants