Class: RockOAuth::Model::Client
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- RockOAuth::Model::Client
- Defined in:
- lib/rockoauth/model/client.rb
Instance Attribute Summary collapse
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#client_secret ⇒ Object
Returns the value of attribute client_secret.
25 26 27 |
# File 'lib/rockoauth/model/client.rb', line 25 def client_secret @client_secret end |
Class Method Details
.create_client_id ⇒ Object
19 20 21 22 23 |
# File 'lib/rockoauth/model/client.rb', line 19 def self.create_client_id RockOAuth.generate_id do |client_id| Helpers.count(self, :client_id => client_id).zero? end end |
Instance Method Details
#valid_client_secret?(secret) ⇒ Boolean
34 35 36 |
# File 'lib/rockoauth/model/client.rb', line 34 def valid_client_secret?(secret) BCrypt::Password.new(client_secret_hash) == secret end |