Module: Ronnie::Authentication
- Included in:
- Client
- Defined in:
- lib/ronnie/authentication.rb
Instance Method Summary collapse
Instance Method Details
#authenticate ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/ronnie/authentication.rb', line 3 def authenticate credentials = {} if consumer_key && consumer_secret credentials[:consumer_key] = consumer_key credentials[:consumer_secret] = consumer_secret end credentials end |
#authenticated? ⇒ Boolean
25 26 27 |
# File 'lib/ronnie/authentication.rb', line 25 def authenticated? !authenticate.empty? end |
#authorize ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ronnie/authentication.rb', line 14 def credentials = {} if token && token_secret credentials[:token] = token credentials[:token_secret] = token_secret end authenticate.merge! credentials end |
#authorized? ⇒ Boolean
29 30 31 |
# File 'lib/ronnie/authentication.rb', line 29 def !token.nil? end |