mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Rename ShibbolethAuthenticationFilter to ShibbolethLoginFilter
This commit is contained in:
@@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dspace.app.rest.model.AuthnRest;
|
||||
import org.dspace.app.rest.security.ShibbolethLoginFilter;
|
||||
import org.dspace.authenticate.ShibAuthentication;
|
||||
import org.dspace.core.Utils;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
@@ -38,7 +39,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 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, {@link org.dspace.app.rest.security.ShibbolethAuthenticationFilter}
|
||||
* 5. NOTE: Prior to hitting this Controller, {@link ShibbolethLoginFilter}
|
||||
* briefly 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
|
||||
@@ -48,7 +49,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author Andrea Bollini (andrea dot bollini at 4science dot it)
|
||||
* @author Giuseppe Digilio (giuseppe dot digilio at 4science dot it)
|
||||
* @see ShibAuthentication
|
||||
* @see org.dspace.app.rest.security.ShibbolethAuthenticationFilter
|
||||
* @see ShibbolethLoginFilter
|
||||
*/
|
||||
@RequestMapping(value = "/api/" + AuthnRest.CATEGORY + "/shibboleth")
|
||||
@RestController
|
||||
|
@@ -13,6 +13,8 @@ import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authenticate.ShibAuthentication;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.authentication.ProviderNotFoundException;
|
||||
@@ -29,10 +31,11 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* @see org.dspace.app.rest.ShibbolethRestController
|
||||
* @see org.dspace.authenticate.ShibAuthentication
|
||||
*/
|
||||
public class ShibbolethAuthenticationFilter extends StatelessLoginFilter {
|
||||
public class ShibbolethLoginFilter extends StatelessLoginFilter {
|
||||
private static final Logger log = LogManager.getLogger(ShibbolethLoginFilter.class);
|
||||
|
||||
public ShibbolethAuthenticationFilter(String url, AuthenticationManager authenticationManager,
|
||||
RestAuthenticationService restAuthenticationService) {
|
||||
public ShibbolethLoginFilter(String url, AuthenticationManager authenticationManager,
|
||||
RestAuthenticationService restAuthenticationService) {
|
||||
super(url, authenticationManager, restAuthenticationService);
|
||||
}
|
||||
|
@@ -134,8 +134,8 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
LogoutFilter.class)
|
||||
// Add a filter before our shibboleth endpoints to do the authentication based on the data in the
|
||||
// HTTP request
|
||||
.addFilterBefore(new ShibbolethAuthenticationFilter("/api/authn/shibboleth", authenticationManager(),
|
||||
restAuthenticationService),
|
||||
.addFilterBefore(new ShibbolethLoginFilter("/api/authn/shibboleth", authenticationManager(),
|
||||
restAuthenticationService),
|
||||
LogoutFilter.class)
|
||||
// Add a custom Token based authentication filter based on the token previously given to the client
|
||||
// before each URL
|
||||
|
Reference in New Issue
Block a user