Module: AuthOpenApi
- Included in:
- StatisticsOpenApi
- Defined in:
- lib/cdnetworks-client/auth_open_api.rb
Defined Under Namespace
Classes: AuthSession
Constant Summary collapse
- LOGIN_URL =
"/api/rest/login"
- LOGOUT_URL =
"/api/rest/logout"
Instance Method Summary collapse
Instance Method Details
#get_session_token(reset_session = false, keynum = 0) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/cdnetworks-client/auth_open_api.rb', line 43 def get_session_token(reset_session = false, keynum = 0) if !@auth_session || reset_session @auth_session = AuthSession.new(@user, @password, self) end session = Array.wrap(@auth_session.session)[keynum] if session.is_a?(Hash) session['sessionToken'] else nil end end |