Changeset 28611
- Timestamp:
- 01/09/08 18:32:54 (9 months ago)
- Files:
-
- nuxeo-addons/nuxeo-platform-login-cas2/trunk/Sample/Sample-CAS2-descriptor-bundle.xml (modified) (1 diff)
- nuxeo-addons/nuxeo-platform-login-cas2/trunk/pom.xml (modified) (1 diff)
- nuxeo-addons/nuxeo-platform-login-cas2/trunk/src/main/java/org/nuxeo/ecm/platform/ui/web/auth/cas2/Cas2Authenticator.java (modified) (4 diffs)
- nuxeo-addons/nuxeo-platform-login-cas2/trunk/src/main/resources/OSGI-INF/CAS2-authenticator-contrib.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nuxeo-addons/nuxeo-platform-login-cas2/trunk/Sample/Sample-CAS2-descriptor-bundle.xml
r20306 r28611 27 27 <authenticationChain> 28 28 <plugins> 29 <plugin>BASIC_AUTH</plugin> 29 30 <plugin>CAS2_AUTH</plugin> 30 <plugin>BASIC_AUTH</plugin>31 31 </plugins> 32 32 </authenticationChain> nuxeo-addons/nuxeo-platform-login-cas2/trunk/pom.xml
r27915 r28611 42 42 </dependencies> 43 43 44 <build> 45 <plugins> 46 <plugin> 47 <groupId>org.apache.maven.plugins</groupId> 48 <artifactId>maven-jar-plugin</artifactId> 49 <configuration> 50 <archive> 51 <manifestFile> 52 src/main/resources/META-INF/MANIFEST.MF 53 </manifestFile> 54 </archive> 55 </configuration> 56 </plugin> 57 </plugins> 58 </build> 59 44 60 </project> nuxeo-addons/nuxeo-platform-login-cas2/trunk/src/main/java/org/nuxeo/ecm/platform/ui/web/auth/cas2/Cas2Authenticator.java
r25652 r28611 32 32 import org.nuxeo.ecm.platform.ui.web.auth.interfaces.NuxeoAuthenticationPlugin; 33 33 import org.nuxeo.ecm.platform.ui.web.auth.interfaces.NuxeoAuthenticationPluginLogoutExtension; 34 import org.nuxeo.ecm.platform.ui.web.util.BaseURL; 34 35 import org.xml.sax.SAXException; 35 36 import edu.yale.its.tp.cas.client.ServiceTicketValidator; … … 48 49 protected final static String CAS_SERVER_HEADER_KEY = "CasServer"; 49 50 protected final static String CAS_SERVER_PATTERN_KEY = "$CASSERVER"; 51 protected final static String NUXEO_SERVER_PATTERN_KEY = "$NUXEO"; 50 52 protected final static String LOGIN_ACTION = "Login"; 51 53 protected final static String LOGOUT_ACTION = "Logout"; … … 97 99 try { 98 100 //httpResponse.sendRedirect(serviceLoginURL + "?" + serviceKey + "=" + appURL); 99 httpResponse.sendRedirect( getServiceURL(httpRequest, LOGIN_ACTION) + "?" + serviceKey + "=" + appURL);101 httpResponse.sendRedirect( getServiceURL(httpRequest, LOGIN_ACTION) + "?" + serviceKey + "=" + getAppURL(httpRequest)); 100 102 } catch (IOException e) { 101 103 log.error("Unable to redirect to CAS login screen:" + e.getMessage()); … … 104 106 } 105 107 return true; 108 } 109 110 private String getAppURL(HttpServletRequest httpRequest) 111 { 112 if ((appURL==null) || (appURL.equals(""))) 113 { 114 appURL=NUXEO_SERVER_PATTERN_KEY; 115 } 116 if (appURL.contains(NUXEO_SERVER_PATTERN_KEY)) 117 { 118 String nxurl = BaseURL.getBaseURL(httpRequest); 119 return appURL.replace(NUXEO_SERVER_PATTERN_KEY, nxurl); 120 } 121 else 122 return appURL; 106 123 } 107 124 nuxeo-addons/nuxeo-platform-login-cas2/trunk/src/main/resources/OSGI-INF/CAS2-authenticator-contrib.xml
r22052 r28611 2 2 3 3 <component name="org.nuxeo.ecm.platform.login.Cas2SSO"> 4 <documentation><pre> 5 CAS2 Authentication Plugin 6 Parameters include : 7 - ticketKey : name of the ticket parameter in the URL 8 - appURL : url used to connect to nuxeo when CAS auth is done 9 ( can be $NUXEO to let Nuxeo compute the URL) 10 - serviceLoginURL : CAS url for login form 11 ( can use $CASSERVER to let nuxeo define url according to CasServer header) 12 - serviceValidateURL : CAS url for ticket validation 13 ( can use $CASSERVER to let nuxeo define url according to CasServer header) 14 - serviceKey : name of the service parameter in the URL</pre> 15 </documentation> 4 16 <extension 5 17 target="org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService"
