Class: UU::OS::CMD::SessionHandler
- Inherits:
-
Object
- Object
- UU::OS::CMD::SessionHandler
- Defined in:
- uu_os_cmd-2.2.5/lib/uu/os/cmd/session_handler.rb
Overview
Default session handler. As custom handler might be used any class (or object instance) which responds to handle_session method.
Instance Method Summary (collapse)
-
- (void) handle_session(session, http_headers, http_parameters)
Propagates data from given session object to corresponding HTTP headers and query parameters.
Instance Method Details
- (void) handle_session(session, http_headers, http_parameters)
This method returns an undefined value.
Propagates data from given session object to corresponding HTTP headers and query parameters.
17 18 19 20 21 22 23 24 25 26 |
# File 'uu_os_cmd-2.2.5/lib/uu/os/cmd/session_handler.rb', line 17 def handle_session(session, http_headers, http_parameters) return if session.nil? access_token = nil if session.kind_of?Hash access_token = session[:accessToken] else access_token = session.access_token if session.respond_to?(:access_token) end http_headers[:authorization] = access_token if access_token end |