aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-10-25 16:23:23 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-10-25 16:23:23 +0200
commitf10fb18bac8e4b98460d100a4af42a943ddb75df (patch)
treed53343fb928cb0186f6fa88ef2684bbea490b413 /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
parent83a92eead9d389060ec43e9459c5a1367aefc29a (diff)
downloadmoa-id-spss-f10fb18bac8e4b98460d100a4af42a943ddb75df.tar.gz
moa-id-spss-f10fb18bac8e4b98460d100a4af42a943ddb75df.tar.bz2
moa-id-spss-f10fb18bac8e4b98460d100a4af42a943ddb75df.zip
fix another problem in session database
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java35
1 files changed, 18 insertions, 17 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
index 16d320ea5..3264fc3bd 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
@@ -47,11 +47,7 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionStorageConstants;
-import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute;
-import at.gv.egovernment.moa.id.auth.data.IdentityLink;
-import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse;
import at.gv.egovernment.moa.id.auth.exception.BuildException;
import at.gv.egovernment.moa.id.auth.exception.DynamicOABuildException;
import at.gv.egovernment.moa.id.auth.exception.ParseException;
@@ -61,6 +57,11 @@ import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants;
import at.gv.egovernment.moa.id.commons.api.AuthConfiguration;
import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters;
import at.gv.egovernment.moa.id.commons.api.IRequest;
+import at.gv.egovernment.moa.id.commons.api.data.ExtendedSAMLAttribute;
+import at.gv.egovernment.moa.id.commons.api.data.IAuthenticationSession;
+import at.gv.egovernment.moa.id.commons.api.data.IIdentityLink;
+import at.gv.egovernment.moa.id.commons.api.data.IMISMandate;
+import at.gv.egovernment.moa.id.commons.api.data.IVerifiyXMLSignatureResponse;
import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException;
import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException;
import at.gv.egovernment.moa.id.commons.api.exceptions.SessionDataStorageException;
@@ -110,13 +111,13 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
public IAuthData buildAuthenticationData(IRequest pendingReq,
- AuthenticationSession session) throws ConfigurationException, BuildException, WrongParametersException, DynamicOABuildException {
+ IAuthenticationSession session) throws ConfigurationException, BuildException, WrongParametersException, DynamicOABuildException {
return buildAuthenticationData(pendingReq, session, pendingReq.getOnlineApplicationConfiguration());
}
public IAuthData buildAuthenticationData(IRequest pendingReq,
- AuthenticationSession session, IOAAuthParameters oaParam) throws ConfigurationException, BuildException, WrongParametersException, DynamicOABuildException {
+ IAuthenticationSession session, IOAAuthParameters oaParam) throws ConfigurationException, BuildException, WrongParametersException, DynamicOABuildException {
AuthenticationData authdata = null;
//only needed for SAML1 legacy support
@@ -253,7 +254,7 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
}
}
- private void buildAuthDataFormMOASession(AuthenticationData authData, AuthenticationSession session,
+ private void buildAuthDataFormMOASession(AuthenticationData authData, IAuthenticationSession session,
IOAAuthParameters oaParam, IRequest protocolRequest) throws BuildException, ConfigurationException {
Collection<String> includedToGenericAuthData = null;
@@ -273,8 +274,8 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
//####################################################
//parse user info's from identityLink
- IdentityLink idlFromPVPAttr = null;
- IdentityLink identityLink = session.getIdentityLink();
+ IIdentityLink idlFromPVPAttr = null;
+ IIdentityLink identityLink = session.getIdentityLink();
if (identityLink != null) {
parseBasicUserInfosFromIDL(authData, identityLink, includedToGenericAuthData);
@@ -515,7 +516,7 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
}
//mandate functionality
- MISMandate misMandate = null;
+ IMISMandate misMandate = null;
if (session.isMandateUsed()) {
//####################################################
//set Mandate reference value
@@ -766,7 +767,7 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
//####################################################################
//parse AuthBlock signature-verification response
//INFO: this parameters are only required for SAML1 auth. protocol
- VerifyXMLSignatureResponse verifyXMLSigResp = session.getXMLVerifySignatureResponse();
+ IVerifiyXMLSignatureResponse verifyXMLSigResp = session.getXMLVerifySignatureResponse();
if (verifyXMLSigResp != null) {
authData.setQualifiedCertificate(verifyXMLSigResp
.isQualifiedCertificate());
@@ -833,7 +834,7 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
return false;
}
- private void parseBasicUserInfosFromIDL(AuthenticationData authData, IdentityLink identityLink, Collection<String> includedGenericSessionData) {
+ private void parseBasicUserInfosFromIDL(AuthenticationData authData, IIdentityLink identityLink, Collection<String> includedGenericSessionData) {
//baseID or wbpk in case of BusinessService without SSO or BusinessService SSO
authData.setIdentificationValue(identityLink.getIdentificationValue());
authData.setIdentificationType(identityLink.getIdentificationType());
@@ -919,7 +920,7 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
* @return Pair<bPK, bPKType> which was received by PVP-Attribute and could be decrypted for this Service Provider,
* or <code>null</code> if no attribute exists or can not decrypted
*/
- private Pair<String, String> getEncryptedbPKFromPVPAttribute(AuthenticationSession session,
+ private Pair<String, String> getEncryptedbPKFromPVPAttribute(IAuthenticationSession session,
AuthenticationData authData, IOAAuthParameters spConfig) {
//set List of encrypted bPKs to authData DAO
String pvpEncbPKListAttr = session.getGenericDataFromSession(PVPConstants.ENC_BPK_LIST_NAME, String.class);
@@ -981,7 +982,7 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
* @param session MOASession, but never null
* @return bPK, which was received by PVP-Attribute, or <code>null</code> if no attribute exists
*/
- private String getbPKValueFromPVPAttribute(AuthenticationSession session) {
+ private String getbPKValueFromPVPAttribute(IAuthenticationSession session) {
String pvpbPKValueAttr = session.getGenericDataFromSession(PVPConstants.BPK_NAME, String.class);
if (MiscUtil.isNotEmpty(pvpbPKValueAttr)) {
@@ -1015,7 +1016,7 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
* @param session MOASession, but never null
* @return bPKType, which was received by PVP-Attribute, or <code>null</code> if no attribute exists
*/
- private String getbPKTypeFromPVPAttribute(AuthenticationSession session) {
+ private String getbPKTypeFromPVPAttribute(IAuthenticationSession session) {
String pvpbPKTypeAttr = session.getGenericDataFromSession(PVPConstants.EID_SECTOR_FOR_IDENTIFIER_NAME, String.class);
if (MiscUtil.isNotEmpty(pvpbPKTypeAttr)) {
@@ -1065,7 +1066,7 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
}
- private IdentityLink buildOAspecificIdentityLink(IOAAuthParameters oaParam, IdentityLink idl, String bPK, String bPKType) throws MOAIDException {
+ private IIdentityLink buildOAspecificIdentityLink(IOAAuthParameters oaParam, IIdentityLink idl, String bPK, String bPKType) throws MOAIDException {
if (oaParam.getBusinessService()) {
Element idlassertion = idl.getSamlAssertion();
//set bpk/wpbk;
@@ -1076,7 +1077,7 @@ public class AuthenticationDataBuilder extends MOAIDAuthConstants {
prIdentificationType.getFirstChild().setNodeValue(bPKType);
IdentityLinkAssertionParser idlparser = new IdentityLinkAssertionParser(idlassertion);
- IdentityLink businessServiceIdl = idlparser.parseIdentityLink();
+ IIdentityLink businessServiceIdl = idlparser.parseIdentityLink();
//resign IDL
IdentityLinkReSigner identitylinkresigner = IdentityLinkReSigner.getInstance();