Class JoseSecretConstraints

    • Method Detail

      • 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.