Skip to content

Commit

Permalink
feat: release name paramétrable pour pairwise-id et eduPersonTargetID
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancailbourdin committed Jan 2, 2025
1 parent 88f1f27 commit 318a4f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class PairwiseIdSamlRegisteredServiceAttributeReleasePolicy extends BaseS

private String salt;
private String attributeName;
private String releaseName = "pairwise-id";
private String separator = "!";
private String algorithm = "SHA";

Expand Down Expand Up @@ -78,7 +79,7 @@ protected Map<String, List<Object>> getAttributesForSamlRegisteredService(
LOGGER.debug("Final value for pairwise-id is [{}]", finalValue);

Map<String, List<Object>> toRelease = new HashMap<>(1);
toRelease.put("urn:oid:urn:oasis:names:tc:SAML:attribute:pairwise-id", Collections.singletonList(finalValue));
toRelease.put(releaseName, Collections.singletonList(finalValue));
return toRelease;
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class TargetedIdSamlRegisteredServiceAttributeReleasePolicy extends BaseS

private String salt;
private String attributeName;
private String releaseName = "eduPersonTargetedID";
private String separator = "!";
private String algorithm = "SHA";

Expand Down Expand Up @@ -81,7 +82,7 @@ protected Map<String, List<Object>> getAttributesForSamlRegisteredService(
LOGGER.debug("Final value for pairwise-id is [{}]", finalValue);

Map<String, List<Object>> toRelease = new HashMap<>(1);
toRelease.put("eduPersonTargetedID", Collections.singletonList(finalValue));
toRelease.put(releaseName, Collections.singletonList(finalValue));
return toRelease;
});

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/services-test/servicetest-26.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{
"@class" : "org.apereo.cas.support.saml.services.PairwiseIdSamlRegisteredServiceAttributeReleasePolicy",
"attributeName" : "uid",
"releaseName" : "urn:oid:urn:oasis:names:tc:SAML:attribute:pairwise-id",
"salt": "XfpLvtJ72E"
},
{
Expand Down

0 comments on commit 318a4f5

Please sign in to comment.