Class AlgorithmSupportMessage


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

      • unsupportedJWSAlgorithm

        public static java.lang.String unsupportedJWSAlgorithm​(JWSAlgorithm unsupported,
                                                               java.util.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 java.lang.String unsupportedJWEAlgorithm​(JWEAlgorithm unsupported,
                                                               java.util.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 java.lang.String unsupportedEncryptionMethod​(EncryptionMethod unsupported,
                                                                   java.util.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 java.lang.String unsupportedEllipticCurve​(Curve unsupported,
                                                                java.util.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.