Module: Rack::Cas::ClientHelpers::Sinatra
- Defined in:
- lib/rack/cas_client.rb
Instance Method Summary collapse
Instance Method Details
#current_user ⇒ Object
421 422 423 424 425 426 427 |
# File 'lib/rack/cas_client.rb', line 421 def current_user return @current_user if @current_user user_data = {:username => request.env['rack.cas.client.user']} extra_attrs = request.env['rack.cas.client.user_extra'] || {} user_data.merge!(extra_attrs) @current_user = OpenStruct.new(user_data) end |