Module: Databasedotcom::OAuth2::Helpers
- Defined in:
- lib/databasedotcom-oauth2.rb
Instance Method Summary collapse
Instance Method Details
#authenticated? ⇒ Boolean
80 81 82 |
# File 'lib/databasedotcom-oauth2.rb', line 80 def authenticated? !unauthenticated? end |
#client ⇒ Object
68 69 70 |
# File 'lib/databasedotcom-oauth2.rb', line 68 def client env['databasedotcom.client'] end |
#me ⇒ Object
84 85 86 87 |
# File 'lib/databasedotcom-oauth2.rb', line 84 def me @me ||= ::Hashie::Mash.new(Databasedotcom::Chatter::User.find(client, "me").raw_hash) #@me.organization_id end |
#token ⇒ Object
72 73 74 |
# File 'lib/databasedotcom-oauth2.rb', line 72 def token env['databasedotcom.token'] end |
#unauthenticated? ⇒ Boolean
76 77 78 |
# File 'lib/databasedotcom-oauth2.rb', line 76 def unauthenticated? client.nil? end |