lib/rack/oauth2/models/auth_request.rb in rack-oauth2-server-2.0.0.beta vs lib/rack/oauth2/models/auth_request.rb in rack-oauth2-server-2.0.0.beta2

- old
+ new

@@ -61,10 +61,10 @@ if response_type == "code" # Requested authorization code access_grant = AccessGrant.create(identity, scope, client_id, redirect_uri) self.grant_code = access_grant.code self.class.collection.update({ :_id=>id, :revoked=>nil }, { :$set=>{ :grant_code=>access_grant.code, :authorized_at=>authorized_at } }) else # Requested access token - access_token = AccessToken.get_token_for(identity, scope, client_id) + access_token = AccessToken.get_token_for(identity, client_id, scope) self.access_token = access_token.token self.class.collection.update({ :_id=>id, :revoked=>nil, :access_token=>nil }, { :$set=>{ :access_token=>access_token.token, :authorized_at=>authorized_at } }) end true end