lib/rack/oauth2/server.rb in rack-oauth2-server-2.4.2 vs lib/rack/oauth2/server.rb in rack-oauth2-server-2.5.0

- old
+ new

@@ -356,10 +356,10 @@ client = get_client(request) case request.POST["grant_type"] when "none" # 4.1 "none" access grant type (i.e. two-legged OAuth flow) requested_scope = request.POST["scope"] ? Utils.normalize_scope(request.POST["scope"]) : client.scope - access_token = AccessToken.get_token_for(client.id.to_s, client, requested_scope, options.expires_in) + access_token = AccessToken.create_token_for(client, requested_scope, nil, options.expires_in) when "authorization_code" # 4.1.1. Authorization Code grant = AccessGrant.from_code(request.POST["code"]) raise InvalidGrantError, "Wrong client" unless grant && client.id == grant.client_id unless client.redirect_uri.nil? || client.redirect_uri.to_s.empty?