Class DateBasedJWTClaimAuditExtractor

All Implemented Interfaces:
Function<ProfileRequestContext,String>, Component, DestructableComponent, InitializableComponent, ContextDataLookupFunction<ProfileRequestContext,String>

public class DateBasedJWTClaimAuditExtractor extends AbstractClaimsSetAuditExtractor<String>
A JWT claim extractor function that returns a formatted String representation of the JSON Date.
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • dateTimeFormatter

      @Nonnull private DateTimeFormatter dateTimeFormatter
      Formatter for date/time fields.
  • Constructor Details

    • DateBasedJWTClaimAuditExtractor

      public DateBasedJWTClaimAuditExtractor()
      Constructor.
  • Method Details

    • setDateTimeFormat

      public void setDateTimeFormat(@Nullable @NotEmpty String format)
      Set the formatting string to apply when extracting date/time fields.
      Parameters:
      format - formatting string
    • doLookup

      @Nullable protected String doLookup(@Nonnull ClaimsSet claimsSet) throws ParseException
      Implemented to perform the actual lookup.
      Specified by:
      doLookup in class AbstractClaimsSetAuditExtractor<String>
      Parameters:
      claimsSet - authentication request to perform the lookup from
      Returns:
      lookup value or null if not found
      Throws:
      ParseException - on error lookin up the claim