Generate Shared Test SAML Response

Issue gh-13433
This commit is contained in:
Josh Cummings
2023-07-11 10:36:03 -06:00
parent f2f19270da
commit 8d0e426654
3 changed files with 83 additions and 20 deletions

View File

@@ -118,7 +118,7 @@ public final class TestOpenSamlObjects {
return response(DESTINATION, ASSERTING_PARTY_ENTITY_ID);
}
static Response response(String destination, String issuerEntityId) {
public static Response response(String destination, String issuerEntityId) {
Response response = build(Response.DEFAULT_ELEMENT_NAME);
response.setID("R" + UUID.randomUUID().toString());
response.setVersion(SAMLVersion.VERSION_20);
@@ -144,7 +144,8 @@ public final class TestOpenSamlObjects {
return assertion(USERNAME, ASSERTING_PARTY_ENTITY_ID, RELYING_PARTY_ENTITY_ID, DESTINATION);
}
static Assertion assertion(String username, String issuerEntityId, String recipientEntityId, String recipientUri) {
public static Assertion assertion(String username, String issuerEntityId, String recipientEntityId,
String recipientUri) {
Assertion assertion = build(Assertion.DEFAULT_ELEMENT_NAME);
assertion.setID("A" + UUID.randomUUID().toString());
assertion.setVersion(SAMLVersion.VERSION_20);