lib/rack/oauth2/models/client.rb in rack-oauth2-server-2.4.1 vs lib/rack/oauth2/models/client.rb in rack-oauth2-server-2.4.2
- old
+ new
@@ -64,10 +64,11 @@
AccessGrant.collection.remove({ :client_id=>id })
AccessToken.collection.remove({ :client_id=>id })
end
def collection
- Server.database["oauth2.clients"]
+ prefix = Server.options[:collection_prefix]
+ Server.database["#{prefix}.clients"]
end
end
# Client identifier.
attr_reader :_id