Module: Cas::LoginPortlet

Defined in:
lib/bcms_cas/login_portlet_extension.rb

Overview

This file needs to be included in a file called app/portlets/helpers/login_portlet_helper.rb

in the project. See installation instructions in the README for details.

Instance Method Summary collapse

Instance Method Details

#login_ticket_tagObject

Generates the hidden field for the login ticket that CAS server expects.



13
14
15
# File 'lib/bcms_cas/login_portlet_extension.rb', line 13

def 
  hidden_field_tag :lt, Cas::Utils.fetch_lt_from_cas
end

#login_url_tagObject Also known as: login_url

Returns the URL to the CAS login service.



20
21
22
# File 'lib/bcms_cas/login_portlet_extension.rb', line 20

def 
  CASClient::Frameworks::Rails::Filter.(@controller)      
end

#service_url_tagObject

Generates the hidden field for the service_url that the CAS server expects, which tells it where to redirect to. Must create an absolute URL.



8
9
10
# File 'lib/bcms_cas/login_portlet_extension.rb', line 8

def service_url_tag
  hidden_field_tag :service, Cas::Utils.service_url(@portlet, @page, session[:return_to])
end