Skip to content

Authorization Code flow implemented? #5

@andrewclink

Description

@andrewclink

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions