lib/vidibus/service/mongoid.rb in vidibus-service-0.0.4 vs lib/vidibus/service/mongoid.rb in vidibus-service-0.1.0
- old
+ new
@@ -69,12 +69,13 @@
# Returns true if given client_secret matches signature.
# This method is called from Vidibus' OauthServer when issuing an OAuth token.
# To prevent sending the service's secret over the network, the ConnectorClient
# sends a signature instead.
- # TODO: Where to put this method?
+ # TODO: Where to put this method? Wanted to extend this gem with vidius-user gem,
+ # but that's not a good idea...
def valid_oauth2_secret?(client_secret)
- client_secret == Vidibus::Secure.sign("#{self.class.this.url}#{uuid}", secret)
+ client_secret == Vidibus::Secure.sign(uuid, secret)
end
protected
# Returns a Client for current service.