Class JwkSetSecretStore.JwkPredicates

java.lang.Object
org.forgerock.secrets.jwkset.JwkSetSecretStore.JwkPredicates
Enclosing class:
JwkSetSecretStore

public static final class JwkSetSecretStore.JwkPredicates extends Object
Utility providing support for Purpose-based JWK availability by predicate, providing some default Predicates based on common JWK claims.
See Also:
  • Constructor Details

    • JwkPredicates

      public JwkPredicates()
  • Method Details

    • keyUse

      public static Predicate<JWK> keyUse(String keyUse)
      Returns a predicate that matches a JWK based on its key use - use. If both keyUse and the JWKs key use are null then this is considered to be a match.

      Note that this Predicate is specifically intended to prevent cross-protocol use when applied to a Purpose.

      Parameters:
      keyUse - the key use to match
      Returns:
      a predicate matching on key use
    • keyOpsContains

      public static Predicate<JWK> keyOpsContains(String keyOp)
      Returns a predicate that matches a JWK based on its key operations - key_ops. If both keyOp and the JWKs key operations are null then this is considered to be a match. If there are JWK key operations, then the keyOp must be contained in them to match
      Parameters:
      keyOp - the key operation to match (contained)
      Returns:
      a predicate matching on key operation containment