Class: Songkick::OAuth2::Model::Client
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Songkick::OAuth2::Model::Client
- Defined in:
- lib/songkick/oauth2/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.
28 29 30 |
# File 'lib/songkick/oauth2/model/client.rb', line 28 def client_secret @client_secret end |
Class Method Details
.create_client_id ⇒ Object
22 23 24 25 26 |
# File 'lib/songkick/oauth2/model/client.rb', line 22 def self.create_client_id Songkick::OAuth2.generate_id do |client_id| Helpers.count(self, :client_id => client_id).zero? end end |
Instance Method Details
#valid_client_secret?(secret) ⇒ Boolean
37 38 39 |
# File 'lib/songkick/oauth2/model/client.rb', line 37 def valid_client_secret?(secret) BCrypt::Password.new(client_secret_hash) == secret end |