aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/test
diff options
context:
space:
mode:
authorkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2012-02-16 19:03:20 +0000
committerkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2012-02-16 19:03:20 +0000
commit92709b7a3e7c18583e127d2160cfd96361ac035b (patch)
treeef9c5b9f6e6211eb95d75d196c79d32cdbd901d8 /id/server/idserverlib/src/test
parent99ecae7954643c971d8a789a196a5d246507a83e (diff)
downloadmoa-id-spss-92709b7a3e7c18583e127d2160cfd96361ac035b.tar.gz
moa-id-spss-92709b7a3e7c18583e127d2160cfd96361ac035b.tar.bz2
moa-id-spss-92709b7a3e7c18583e127d2160cfd96361ac035b.zip
* Update sourceID Parameter
* Blacklist-Übergabe an iaik-moa * iaik-moa.jar zu repository hinzugefügt git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1250 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/server/idserverlib/src/test')
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java2
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java8
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java12
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java2
4 files changed, 12 insertions, 12 deletions
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java
index d9cd13259..a71fe0181 100644
--- a/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java
+++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java
@@ -619,7 +619,7 @@ public class Test300VerifyAuthBlock extends AbnahmeTestCase {
oaParam.getProvideIdentityLink() ? DOMUtils.serializeNode(identityLink.getSamlAssertion()) : "";
String authBlock = oaParam.getProvideAuthBlock() ? session.getAuthBlock() : "";
String samlAssertion = new AuthenticationDataAssertionBuilder().build(
- authData, prPerson, authBlock, ilAssertion, session.getBkuURL(), "", false, null, null);
+ authData, prPerson, authBlock, ilAssertion, session.getBkuURL(), "", false, null);
authData.setSamlAssertion(samlAssertion);
return authData;
}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java
index 979a4aa24..915dc540c 100644
--- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java
@@ -51,9 +51,9 @@ public class SAMLArtifactBuilderTest extends UnitTestCase {
}
protected void setUp() throws Exception {
builder = new SAMLArtifactBuilder();
- artifact1 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_1), false);
- artifact2 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_2), false);
- artifact3 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_3), false);
+ artifact1 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_1, null), false);
+ artifact2 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_2, null), false);
+ artifact3 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_3, null), false);
}
public void testBuildArtifactLength() throws BuildException {
@@ -62,7 +62,7 @@ public class SAMLArtifactBuilderTest extends UnitTestCase {
assertEquals(42, artifact3.length);
}
public void testBuildSameArtifact() throws Exception {
- byte[] artifact1Clone = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_1), false);
+ byte[] artifact1Clone = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_1, null), false);
assertEquals(new String(artifact1), new String(artifact1Clone));
}
public void testBuildDifferentArtifacts() throws BuildException {
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java
index 1dab28dea..d34678f0c 100644
--- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java
@@ -44,7 +44,7 @@ public class SAMLArtifactParserTest extends UnitTestCase {
public void testParseTypeCode() throws Exception {
String sessionID = Random.nextRandom();
- String samlArtifact = new SAMLArtifactBuilder().build(URL1, sessionID);
+ String samlArtifact = new SAMLArtifactBuilder().build(URL1, sessionID, null);
byte[] typeCode = new SAMLArtifactParser(samlArtifact).parseTypeCode();
assertEquals(typeCode[0], 0);
assertEquals(typeCode[1], 1);
@@ -52,8 +52,8 @@ public class SAMLArtifactParserTest extends UnitTestCase {
public void testParseAssertionHandleSameSessionID() throws Exception {
// SAML artifacts for different authURL's but same sessionID MUST give same assertion handle
String sessionID = Random.nextRandom();
- String samlArtifact1 = new SAMLArtifactBuilder().build(URL1, sessionID);
- String samlArtifact2 = new SAMLArtifactBuilder().build(URL2, sessionID);
+ String samlArtifact1 = new SAMLArtifactBuilder().build(URL1, sessionID, null);
+ String samlArtifact2 = new SAMLArtifactBuilder().build(URL2, sessionID, null);
String assertionHandle1 = new SAMLArtifactParser(samlArtifact1).parseAssertionHandle();
String assertionHandle2 = new SAMLArtifactParser(samlArtifact2).parseAssertionHandle();
assertEquals(assertionHandle1, assertionHandle2);
@@ -62,8 +62,8 @@ public class SAMLArtifactParserTest extends UnitTestCase {
// SAML artifacts for same authURL but different sessionID's MUST give different assertion handles
String sessionID1 = Random.nextRandom();
String sessionID2 = Random.nextRandom();
- String samlArtifact1 = new SAMLArtifactBuilder().build(URL1, sessionID1);
- String samlArtifact2 = new SAMLArtifactBuilder().build(URL1, sessionID2);
+ String samlArtifact1 = new SAMLArtifactBuilder().build(URL1, sessionID1, null);
+ String samlArtifact2 = new SAMLArtifactBuilder().build(URL1, sessionID2, null);
String assertionHandle1 = new SAMLArtifactParser(samlArtifact1).parseAssertionHandle();
String assertionHandle2 = new SAMLArtifactParser(samlArtifact2).parseAssertionHandle();
assertFalse(assertionHandle1.equals(assertionHandle2));
@@ -71,7 +71,7 @@ public class SAMLArtifactParserTest extends UnitTestCase {
public void testParseAssertionHandleSameSAMLArtifact() throws Exception {
// SAML artifact parsed twice MUST give same assertion handle each time
String sessionID = Random.nextRandom();
- String samlArtifact = new SAMLArtifactBuilder().build(URL1, sessionID);
+ String samlArtifact = new SAMLArtifactBuilder().build(URL1, sessionID, null);
String assertionHandle1 = new SAMLArtifactParser(samlArtifact).parseAssertionHandle();
String assertionHandle2 = new SAMLArtifactParser(samlArtifact).parseAssertionHandle();
assertEquals(assertionHandle1, assertionHandle2);
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java
index 73085270f..467c6520e 100644
--- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java
@@ -43,7 +43,7 @@ public class SAMLRequestBuilderTest extends UnitTestCase {
public void testBuild() throws Exception {
String requestID = "123";
- String samlArtifact = new SAMLArtifactBuilder().build("https://moa.gv.at/auth/", "12345678901234567890");
+ String samlArtifact = new SAMLArtifactBuilder().build("https://moa.gv.at/auth/", "12345678901234567890", null);
String REQUEST_SHOULD = "<samlp:Request xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" RequestID=\"" +
requestID + "\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"IGNORE\">" +
"<samlp:AssertionArtifact>" + samlArtifact + "</samlp:AssertionArtifact>" +