Module: SocialStream::Oauth2Server::Models::User
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/social_stream/oauth2_server/models/user.rb
Instance Method Summary collapse
-
#client_authorize!(client) ⇒ Object
Create a new tie to Site::Client.
-
#client_authorized?(client) ⇒ Boolean
Is #client authorized by this User.
Instance Method Details
#client_authorize!(client) ⇒ Object
Create a new tie to Site::Client
27 28 29 30 31 |
# File 'lib/social_stream/oauth2_server/models/user.rb', line 27 def (client) unless contact_to!(client).relation_ids.include?(Relation::Auth.instance.id) contact_to!(client).relation_ids += [ Relation::Auth.instance.id ] end end |
#client_authorized?(client) ⇒ Boolean
Is #client authorized by this SocialStream::Oauth2Server::Models::User
22 23 24 |
# File 'lib/social_stream/oauth2_server/models/user.rb', line 22 def (client) contact_to!(client).relation_ids.include? Relation::Auth.instance.id end |