Module: Dropbox::WebClient::Authentication
- Included in:
- Session
- Defined in:
- lib/dropbox/web_client/authentication.rb
Instance Method Summary collapse
- #authenticate ⇒ Object
- #authenticated? ⇒ Boolean
-
#ensure_authenticated ⇒ Object
TODO: Should keep in consideration the session expiration…
Instance Method Details
#authenticate ⇒ Object
10 11 12 13 14 15 |
# File 'lib/dropbox/web_client/authentication.rb', line 10 def authenticate get_login post_login @authenticated = true end |
#authenticated? ⇒ Boolean
6 7 8 |
# File 'lib/dropbox/web_client/authentication.rb', line 6 def authenticated? @authenticated end |
#ensure_authenticated ⇒ Object
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 |