Class JoseSecretConstraints

java.lang.Object
org.forgerock.json.jose.utils.JoseSecretConstraints

public final class JoseSecretConstraints extends Object
Set of SecretConstraints for filtering Secrets.
  • Method Details

    • allowedAlgorithm

      public static SecretConstraint<CryptoKey> allowedAlgorithm(Algorithm algorithm)
      Enforces that the key is allowed to be used with the given JWA algorithm.

      Both JCA and JWA equivalent algorithm names are tested against CryptoKey.allowsAlgorithm(String).

      Parameters:
      algorithm - the JWA algorithm to check compatibility with.
      Returns:
      a constraint that enforces that keys are allowed to be used with the given algorithm.