lib/rack/oauth2/models/access_token.rb in tpitale-rack-oauth2-server-2.2.1 vs lib/rack/oauth2/models/access_token.rb in tpitale-rack-oauth2-server-2.2.1.1

- old
+ new

@@ -13,11 +13,11 @@ def self.create_token_for(client, scope) scope = Utils.normalize_scope(scope) & Utils.normalize_scope(client.scope) # Only allowed scope attributes = { :code => Server.secure_random, - :scope => scope, + :scope => scope.join(' '), :client => client } create(attributes) @@ -39,10 +39,10 @@ token ||= begin attributes = { :code => Server.secure_random, :identity => identity, - :scope => scope, + :scope => scope.join(' '), :client_id => client.id } create(attributes) # Client.collection.update({ :_id=>client.id }, { :$inc=>{ :tokens_granted=>1 } })