Module: Databasedotcom::OAuth2::Helpers

Defined in:
lib/databasedotcom-oauth2.rb

Instance Method Summary collapse

Instance Method Details

#authenticated?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/databasedotcom-oauth2.rb', line 38

def authenticated?
  !unauthenticated?
end

#clientObject



30
31
32
# File 'lib/databasedotcom-oauth2.rb', line 30

def client
  env[CLIENT_KEY]
end

#meObject



42
43
44
# File 'lib/databasedotcom-oauth2.rb', line 42

def me
  @me ||= ::Hashie::Mash.new(Databasedotcom::Chatter::User.find(client, "me").raw_hash)
end

#unauthenticated?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/databasedotcom-oauth2.rb', line 34

def unauthenticated?
  client.nil?
end