Class: SimpleEventickApi::Auth
- Defined in:
- lib/simple_eventick_api/auth.rb
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.authenticate(user, password) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/simple_eventick_api/auth.rb', line 7 def self.authenticate (user, password) opts = { basic_auth: { username: user, password: password } } response = SimpleEventickApi.get(@resource, opts) response['token'] rescue nil end |