Replace deprecated OpenSaml methods
This commit is contained in:
parent
6f8ec3df60
commit
d4ed0ad0cf
|
@ -186,7 +186,7 @@ public final class OpenSamlMetadataResolver implements Saml2MetadataResolver {
|
|||
|
||||
private NameIDFormat buildNameIDFormat(RelyingPartyRegistration registration) {
|
||||
NameIDFormat nameIdFormat = build(NameIDFormat.DEFAULT_ELEMENT_NAME);
|
||||
nameIdFormat.setFormat(registration.getNameIdFormat());
|
||||
nameIdFormat.setURI(registration.getNameIdFormat());
|
||||
return nameIdFormat;
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ final class OpenSamlLogoutRequestResolver {
|
|||
Saml2AuthenticatedPrincipal principal = (Saml2AuthenticatedPrincipal) authentication.getPrincipal();
|
||||
for (String index : principal.getSessionIndexes()) {
|
||||
SessionIndex sessionIndex = this.sessionIndexBuilder.buildObject();
|
||||
sessionIndex.setSessionIndex(index);
|
||||
sessionIndex.setValue(index);
|
||||
logoutRequest.getSessionIndexes().add(sessionIndex);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -364,7 +364,7 @@ public final class TestOpenSamlObjects {
|
|||
Attribute websiteAttr = attributeBuilder.buildObject();
|
||||
websiteAttr.setName("website");
|
||||
XSURI uri = new XSURIBuilder().buildObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSURI.TYPE_NAME);
|
||||
uri.setValue("https://johndoe.com/");
|
||||
uri.setURI("https://johndoe.com/");
|
||||
websiteAttr.getAttributeValues().add(uri);
|
||||
attrStmt2.getAttributes().add(websiteAttr);
|
||||
Attribute registeredAttr = attributeBuilder.buildObject();
|
||||
|
|
|
@ -87,7 +87,7 @@ public class OpenSamlLogoutRequestResolverTests {
|
|||
LogoutRequest logoutRequest = getLogoutRequest(saml2LogoutRequest.getSamlRequest(), binding);
|
||||
assertThat(logoutRequest.getNameID().getValue()).isEqualTo(authentication.getName());
|
||||
assertThat(logoutRequest.getSessionIndexes()).hasSize(1);
|
||||
assertThat(logoutRequest.getSessionIndexes().get(0).getSessionIndex()).isEqualTo("session-index");
|
||||
assertThat(logoutRequest.getSessionIndexes().get(0).getValue()).isEqualTo("session-index");
|
||||
}
|
||||
|
||||
private Saml2Authentication authentication(RelyingPartyRegistration registration) {
|
||||
|
|
Loading…
Reference in New Issue