Module: RockOAuth::Model::ResourceOwner
- Defined in:
- lib/rockoauth/model/resource_owner.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/rockoauth/model/resource_owner.rb', line 5 def self.included(klass) klass.has_many :oauth2_authorizations, :class_name => Authorization.name, :as => :oauth2_resource_owner, :dependent => :destroy end |
Instance Method Details
#grant_access!(client, options = {}) ⇒ Object
12 13 14 |
# File 'lib/rockoauth/model/resource_owner.rb', line 12 def grant_access!(client, = {}) Authorization.for(self, client, ) end |
#oauth2_authorization_for(client) ⇒ Object
16 17 18 |
# File 'lib/rockoauth/model/resource_owner.rb', line 16 def (client) .find_by_client_id(client.id) end |