diff options
author | Thomas <> | 2022-01-09 21:30:56 +0100 |
---|---|---|
committer | Thomas <> | 2022-01-09 21:30:56 +0100 |
commit | 0e60708e5915eb858d5931c45f807329bd365c11 (patch) | |
tree | 6d5e5a305e8b9b7e969fb051acffd811379709b6 /eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/Pvp2AssertionBuilder.java | |
parent | e28540643df720d0f3ea2d00c8bee8f0beeebce8 (diff) | |
download | EAAF-Components-0e60708e5915eb858d5931c45f807329bd365c11.tar.gz EAAF-Components-0e60708e5915eb858d5931c45f807329bd365c11.tar.bz2 EAAF-Components-0e60708e5915eb858d5931c45f807329bd365c11.zip |
chore(SAML2): update implementation to remove usage of deprecated openSAML4.x API
Diffstat (limited to 'eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/Pvp2AssertionBuilder.java')
-rw-r--r-- | eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/Pvp2AssertionBuilder.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/Pvp2AssertionBuilder.java b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/Pvp2AssertionBuilder.java index 21912592..88ff2206 100644 --- a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/Pvp2AssertionBuilder.java +++ b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/Pvp2AssertionBuilder.java @@ -107,7 +107,7 @@ public class Pvp2AssertionBuilder implements PvpConstants { final AuthnContextClassRef authnContextClassRef = Saml2Utils.createSamlObject(AuthnContextClassRef.class); - authnContextClassRef.setAuthnContextClassRef(qaaLevel); + authnContextClassRef.setURI(qaaLevel); final NameID subjectNameID = Saml2Utils.createSamlObject(NameID.class); subjectNameID.setFormat(attrQuery.getSubject().getNameID().getFormat()); @@ -151,7 +151,7 @@ public class Pvp2AssertionBuilder implements PvpConstants { // check if authn. request contains LoA final RequestedAuthnContext reqAuthnContext = authnRequest.getRequestedAuthnContext(); if (reqAuthnContext == null) { - authnContextClassRef.setAuthnContextClassRef(authData.getEidasQaaLevel()); + authnContextClassRef.setURI(authData.getEidasQaaLevel()); } else { // authn. request requests LoA levels. To LoA validation @@ -169,12 +169,12 @@ public class Pvp2AssertionBuilder implements PvpConstants { if (reqAuthnContextClassRefIt.size() == 0) { QaaLevelVerifier.verifyQaaLevel(authData.getEidasQaaLevel(), oaParam.getRequiredLoA(), loaMatchingMode); - authnContextClassRef.setAuthnContextClassRef(authData.getEidasQaaLevel()); + authnContextClassRef.setURI(authData.getEidasQaaLevel()); } else { final List<String> eidasLoaFromRequest = new ArrayList<>(); for (final AuthnContextClassRef authnClassRef : reqAuthnContextClassRefIt) { - final String qaa_uri = authnClassRef.getAuthnContextClassRef(); + final String qaa_uri = authnClassRef.getURI(); if (!qaa_uri.trim().startsWith(EaafConstants.EIDAS_LOA_PREFIX)) { if (loaLevelMapper != null) { @@ -202,7 +202,7 @@ public class Pvp2AssertionBuilder implements PvpConstants { // verifiy LoAs from request to authentication LoA QaaLevelVerifier.verifyQaaLevel(authData.getEidasQaaLevel(), eidasLoaFromRequest, loaMatchingMode); - authnContextClassRef.setAuthnContextClassRef(authData.getEidasQaaLevel()); + authnContextClassRef.setURI(authData.getEidasQaaLevel()); } } @@ -309,12 +309,12 @@ public class Pvp2AssertionBuilder implements PvpConstants { if (metadataNameIdFormats != null) { for (final NameIDFormat el : metadataNameIdFormats) { - if (NameIDType.PERSISTENT.equals(el.getFormat())) { + if (NameIDType.PERSISTENT.equals(el.getURI())) { nameIdFormat = NameIDType.PERSISTENT; break; - } else if (NameIDType.TRANSIENT.equals(el.getFormat()) - || NameIDType.UNSPECIFIED.equals(el.getFormat())) { + } else if (NameIDType.TRANSIENT.equals(el.getURI()) + || NameIDType.UNSPECIFIED.equals(el.getURI())) { break; } @@ -442,7 +442,7 @@ public class Pvp2AssertionBuilder implements PvpConstants { Saml2Utils.createSamlObject(AudienceRestriction.class); final Audience audience = Saml2Utils.createSamlObject(Audience.class); - audience.setAudienceURI(entityID); + audience.setURI(entityID); audienceRestriction.getAudiences().add(audience); conditions.setNotBefore(date); conditions.setNotOnOrAfter(isValidTo); |