Class AlgorithmSupportMessage


  • public class AlgorithmSupportMessage
    extends Object
    Algorithm support messages, intended for JOSE exceptions.
    Version:
    2015-05-20
    Author:
    Vladimir Dzhuvinov
    • Method Detail

      • unsupportedJWSAlgorithm

        public static String unsupportedJWSAlgorithm​(JWSAlgorithm unsupported,
                                                     Collection<JWSAlgorithm> supported)
        Returns a message that the specified JWS algorithm is not supported.
        Parameters:
        unsupported - The unsupported JWS algorithm. Must not be null.
        supported - The supported JWS algorithms. Must not be null.
        Returns:
        The message.
      • unsupportedJWEAlgorithm

        public static String unsupportedJWEAlgorithm​(JWEAlgorithm unsupported,
                                                     Collection<JWEAlgorithm> supported)
        Returns a message that the specified JWE algorithm is not supported.
        Parameters:
        unsupported - The unsupported JWE algorithm. Must not be null.
        supported - The supported JWE algorithms. Must not be null.
        Returns:
        The message.
      • unsupportedEncryptionMethod

        public static String unsupportedEncryptionMethod​(EncryptionMethod unsupported,
                                                         Collection<EncryptionMethod> supported)
        Returns a message that the specified JWE encryption method is not supported.
        Parameters:
        unsupported - The unsupported JWE encryption method. Must not be null.
        supported - The supported JWE encryption methods. Must not be null.
        Returns:
        The message.
      • unsupportedEllipticCurve

        public static String unsupportedEllipticCurve​(Curve unsupported,
                                                      Collection<Curve> supported)
        Returns a message that the specified elliptic curve is not supported.
        Parameters:
        unsupported - The unsupported elliptic curve. Must not be null.
        supported - The supported elliptic curves. Must not be null.
        Returns:
        The message.