Module: Dropbox::WebClient::Authentication

Included in:
Session
Defined in:
lib/dropbox/web_client/authentication.rb

Instance Method Summary collapse

Instance Method Details

#authenticateObject



10
11
12
13
14
15
# File 'lib/dropbox/web_client/authentication.rb', line 10

def authenticate
  
  

  @authenticated = true
end

#authenticated?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/dropbox/web_client/authentication.rb', line 6

def authenticated?
  @authenticated
end

#ensure_authenticatedObject

TODO: Should keep in consideration the session expiration…



18
19
20
21
# File 'lib/dropbox/web_client/authentication.rb', line 18

def ensure_authenticated
  authenticate unless authenticated?
  true
end