Module: Cas::LoginPortlet
- Included in:
- LoginPortletHelper
- 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
-
#login_ticket_tag ⇒ Object
Generates the hidden field for the login ticket that CAS server expects.
-
#login_url_tag ⇒ Object
(also: #login_url)
Returns the URL to the CAS login service.
-
#service_url_tag ⇒ Object
Generates the hidden field for the service_url that the CAS server expects, which tells it where to redirect to.
Instance Method Details
#login_ticket_tag ⇒ Object
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 login_ticket_tag hidden_field_tag :lt, Cas::Utils.fetch_lt_from_cas end |
#login_url_tag ⇒ Object 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 login_url_tag CASClient::Frameworks::Rails::Filter.login_url(@controller) end |
#service_url_tag ⇒ Object
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 |