trustAuthentication
This commit is contained in:
@@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.maxkey.authn.RealmAuthenticationProvider;
|
||||
import org.maxkey.authz.saml.common.EndpointGenerator;
|
||||
import org.maxkey.authz.saml.common.TrustResolver;
|
||||
import org.maxkey.authz.saml.service.IDService;
|
||||
@@ -44,7 +45,6 @@ import org.maxkey.constants.ConstantsLoginType;
|
||||
import org.maxkey.crypto.keystore.KeyStoreLoader;
|
||||
import org.maxkey.domain.apps.AppsSAML20Details;
|
||||
import org.maxkey.persistence.service.AppsSaml20DetailsService;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.opensaml.common.binding.SAMLMessageContext;
|
||||
import org.opensaml.common.binding.security.IssueInstantRule;
|
||||
import org.opensaml.common.binding.security.MessageReplayRule;
|
||||
@@ -88,6 +88,10 @@ public class ConsumerEndpoint {
|
||||
@Autowired
|
||||
@Qualifier("idService")
|
||||
private IDService idService;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("authenticationProvider")
|
||||
RealmAuthenticationProvider authenticationProvider ;
|
||||
|
||||
private String singleSignOnServiceURL;
|
||||
private String assertionConsumerServiceURL;
|
||||
@@ -178,7 +182,7 @@ public class ConsumerEndpoint {
|
||||
|
||||
logger.debug("assertion.getID() ", assertion.getAuthnStatements());
|
||||
|
||||
WebContext.setAuthentication(username, ConstantsLoginType.SAMLTRUST,"","","success");
|
||||
authenticationProvider.trustAuthentication(username, ConstantsLoginType.SAMLTRUST,"","","success");
|
||||
|
||||
ModelAndView mav = new ModelAndView();
|
||||
mav.addObject("username", username);
|
||||
|
||||
Reference in New Issue
Block a user