[java-identity-provider] branch main updated: IDP-1995 - Add support for DateTimeAttributeValue to supporting classes

Scott Cantor cantor.2 at osu.edu
Thu Aug 18 13:17:02 UTC 2022


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=9a7ef708c4638394b555647782afe30a97da7b94

The following commit(s) were added to refs/heads/main by this push:
     new 9a7ef708c IDP-1995 - Add support for DateTimeAttributeValue to supporting classes
9a7ef708c is described below

commit 9a7ef708c4638394b555647782afe30a97da7b94
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Aug 18 09:14:51 2022 -0400

    IDP-1995 - Add support for DateTimeAttributeValue to supporting classes
    
    https://shibboleth.atlassian.net/browse/IDP-1995
    
    Revocation condition.
---
 .../idp/authn/revocation/impl/AttributeRevocationCondition.java      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/revocation/impl/AttributeRevocationCondition.java b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/revocation/impl/AttributeRevocationCondition.java
index 61dac04d1..98800c7ba 100644
--- a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/revocation/impl/AttributeRevocationCondition.java
+++ b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/revocation/impl/AttributeRevocationCondition.java
@@ -33,6 +33,7 @@ import org.opensaml.profile.context.ProfileRequestContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import net.shibboleth.idp.attribute.DateTimeAttributeValue;
 import net.shibboleth.idp.attribute.IdPAttribute;
 import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.StringAttributeValue;
@@ -180,7 +181,9 @@ public class AttributeRevocationCondition extends AbstractInitializableComponent
             if (resolutionContext.getResolvedIdPAttributes().containsKey(attributeId)) {
                 for (final IdPAttributeValue value :
                         resolutionContext.getResolvedIdPAttributes().get(attributeId).getValues()) {
-                    if (value instanceof StringAttributeValue) {
+                    if (value instanceof DateTimeAttributeValue) {
+                        records.add(((DateTimeAttributeValue) value).getValue());
+                    } else if (value instanceof StringAttributeValue) {
                         try {
                             records.add(Instant.ofEpochSecond(Long.valueOf(((StringAttributeValue) value).getValue())));
                             

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list