Changeset 2107


Ignore:
Timestamp:
Nov 15, 2011, 4:47:46 PM (11 years ago)
Author:
work@…
Message:

Resolved #504, added a configuration parameter to enable shibboleth authentication instead of relying on the request header

Location:
trunk/grails-app
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/default.properties

    r2021 r2107  
    3737authentication.users.user.email=user@dbnp.org
    3838authentication.users.user.administrator=false
     39
     40# configuration parameter to define if shibboleth
     41# authentication is enabled in apache running in
     42# front of the Grails application. By default this
     43# is set to false and can be overwritten to true in
     44# an externalized confgiration (see ~/.gscf/*.properties)
     45# More information is available here:
     46# https://trac.nbic.nl/gscf/ticket/501
     47authentication.shibboleth=false
  • trunk/grails-app/controllers/dbnp/authentication/LoginController.groovy

    r2084 r2107  
    5858                        }
    5959                        return
    60                 } else if (request.getHeaderNames().find{ it.toLowerCase() == 'useShibboleth'.toLowerCase() }) {
     60                } else if (grailsApplication.config.authentication.shibboleth.toBoolean()) {
    6161                        // authenticated through shibboleth?
    6262                        if (request.getHeaderNames().find{ it.toLowerCase() == 'persistent-id'.toLowerCase() }) {
  • trunk/grails-app/views/common/_login_panel.gsp

    r2081 r2107  
     1<%@ page import="org.codehaus.groovy.grails.commons.ConfigurationHolder" %>
    12<!-- LOGIN PANEL -->
    23<div id="toppanel" class="toppanel">
     
    8081                                <sec:ifLoggedIn><g:link controller="logout" action="index">sign out</g:link></sec:ifLoggedIn>
    8182                                <sec:ifNotLoggedIn>
    82                                         <g:if test="${request.getHeaderNames().find{ it.toLowerCase() == 'UseShibboleth'.toLowerCase() }}">
     83                                        <g:if test="${grailsApplication.config.authentication.shibboleth.toBoolean()}">
    8384                                                <g:link class="open" controller="login">Log in</g:link>
    8485                                        </g:if>
  • trunk/grails-app/views/login/auth.gsp

    r2080 r2107  
    7676        </div>
    7777</div>
    78 <g:if test="${!request.getHeaderNames().find{ it.toLowerCase() == 'UseShibboleth'.toLowerCase() }}">
     78<g:if test="${!grailsApplication.config.authentication.shibboleth.toBoolean()}">
    7979<script type='text/javascript'>
    8080        <!--
Note: See TracChangeset for help on using the changeset viewer.