Class ShibbolethRestController
- java.lang.Object
-
- org.dspace.app.rest.ShibbolethRestController
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
@RequestMapping("/api/authn/shibboleth") @RestController public class ShibbolethRestController extends Object implements org.springframework.beans.factory.InitializingBeanRest controller that handles redirect *after* shibboleth authentication succeeded.Shibboleth authentication does NOT occur in this Controller, but occurs before this class is called. The general Shibboleth login process is as follows: 1. When Shibboleth plugin is enabled, client/UI receives Shibboleth's absolute URL in WWW-Authenticate header. See
ShibAuthenticationloginPageURL() method. 2. Client sends the user to that URL when they select Shibboleth authentication. 3. User logs in using Shibboleth 4. If successful, they are redirected by Shibboleth to this Controller (the path of this controller is passed to Shibboleth as a URL param in step 1) 5. NOTE: Prior to hitting this Controller,ShibbolethAuthenticationFilterbriefly intercepts the request in order to check for a valid Shibboleth login (see ShibAuthentication.authenticate()) and store that user info in a JWT. 6. This Controller then gets the request & looks for a "redirectUrl" param (also a part of the original URL from step 1), and redirects the user to that location (after verifying it's a trusted URL). Usually this is a redirect back to the Client/UI page where the User started.- Author:
- Andrea Bollini (andrea dot bollini at 4science dot it), Giuseppe Digilio (giuseppe dot digilio at 4science dot it)
- See Also:
ShibAuthentication,ShibbolethAuthenticationFilter
-
-
Constructor Summary
Constructors Constructor Description ShibbolethRestController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voidshibboleth(javax.servlet.http.HttpServletResponse response, String redirectUrl)
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
shibboleth
@RequestMapping(method=GET) public void shibboleth(javax.servlet.http.HttpServletResponse response, @RequestParam(name="redirectUrl",required=false) String redirectUrl) throws IOException- Throws:
IOException
-
-