v 3.3.0
This commit is contained in:
@@ -43,7 +43,7 @@ import org.maxkey.authz.saml20.consumer.spring.IdentityProviderAuthenticationExc
|
||||
import org.maxkey.authz.saml20.consumer.spring.ServiceProviderAuthenticationException;
|
||||
import org.maxkey.authz.saml20.provider.xml.AuthnResponseGenerator;
|
||||
import org.maxkey.authz.saml20.xml.SAML2ValidatorSuite;
|
||||
import org.maxkey.constants.ConstantsLoginType;
|
||||
import org.maxkey.constants.ConstsLoginType;
|
||||
import org.maxkey.crypto.keystore.KeyStoreLoader;
|
||||
import org.maxkey.entity.apps.AppsSAML20Details;
|
||||
import org.maxkey.persistence.service.AppsSaml20DetailsService;
|
||||
@@ -187,7 +187,7 @@ public class ConsumerEndpoint {
|
||||
|
||||
logger.debug("assertion.getID() ", assertion.getAuthnStatements());
|
||||
LoginCredential loginCredential =new LoginCredential(
|
||||
username,"",ConstantsLoginType.SAMLTRUST);
|
||||
username,"",ConstsLoginType.SAMLTRUST);
|
||||
authenticationProvider.authentication(loginCredential,true);
|
||||
|
||||
ModelAndView mav = new ModelAndView();
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.maxkey.constants.Boolean;
|
||||
import org.maxkey.constants.ConstsBoolean;
|
||||
import org.maxkey.constants.ldap.ActiveDirectoryUser;
|
||||
import org.maxkey.entity.ExtraAttr;
|
||||
import org.maxkey.entity.ExtraAttrs;
|
||||
@@ -79,7 +79,7 @@ public class AttributeStatementGenerator {
|
||||
}
|
||||
|
||||
logger.debug("ExtendAttr "+saml20Details.getExtendAttr());
|
||||
if(Boolean.isTrue(saml20Details.getIsExtendAttr()) && saml20Details.getExtendAttr() != null) {
|
||||
if(ConstsBoolean.isTrue(saml20Details.getIsExtendAttr()) && saml20Details.getExtendAttr() != null) {
|
||||
ExtraAttrs extraAttrs=new ExtraAttrs(saml20Details.getExtendAttr());
|
||||
for(ExtraAttr extraAttr : extraAttrs.getExtraAttrs()) {
|
||||
logger.debug("Attribute : "+extraAttr.getAttr()+" , Vale : "+extraAttr.getValue()+" , Type : "+extraAttr.getType());
|
||||
@@ -153,6 +153,8 @@ public class AttributeStatementGenerator {
|
||||
attributeMap.put(ActiveDirectoryUser.MAIL, userInfo.getEmail());
|
||||
attributeMap.put(ActiveDirectoryUser.EMAIL, userInfo.getEmail());
|
||||
|
||||
attributeMap.put("institution", userInfo.getInstId());
|
||||
|
||||
attributeMap.put(ActiveDirectoryUser.USERSTATUS, userInfo.getStatus() + "");
|
||||
|
||||
return attributeMap;
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.maxkey.authz.saml.service.IDService;
|
||||
import org.maxkey.authz.saml.service.TimeService;
|
||||
import org.maxkey.authz.saml20.binding.BindingAdapter;
|
||||
import org.maxkey.authz.saml20.xml.IssuerGenerator;
|
||||
import org.maxkey.constants.Boolean;
|
||||
import org.maxkey.constants.ConstsBoolean;
|
||||
import org.maxkey.entity.apps.AppsSAML20Details;
|
||||
import org.opensaml.Configuration;
|
||||
import org.opensaml.saml2.core.Assertion;
|
||||
@@ -78,7 +78,7 @@ public class AuthnResponseGenerator {
|
||||
attributeMap);
|
||||
|
||||
//Encrypt
|
||||
if(Boolean.isTrue(saml20Details.getEncrypted())) {
|
||||
if(ConstsBoolean.isTrue(saml20Details.getEncrypted())) {
|
||||
logger.info("begin to encrypt assertion");
|
||||
try {
|
||||
// Assume this contains a recipient's RSA public
|
||||
|
||||
Reference in New Issue
Block a user