Class DefaultJWSVerifierFactory

    • Field Detail

      • SUPPORTED_ALGORITHMS

        public static final java.util.Set<JWSAlgorithm> SUPPORTED_ALGORITHMS
        The supported JWS algorithms.
    • Constructor Detail

      • DefaultJWSVerifierFactory

        public DefaultJWSVerifierFactory()
    • Method Detail

      • supportedJWSAlgorithms

        public java.util.Set<JWSAlgorithm> supportedJWSAlgorithms()
        Description copied from interface: JWSProvider
        Returns the names of the supported algorithms by the JWS provider instance. These correspond to the alg JWS header parameter.
        Specified by:
        supportedJWSAlgorithms in interface JWSProvider
        Returns:
        The supported JWS algorithms, empty set if none.
      • getJCAContext

        public JCAContext getJCAContext()
        Description copied from interface: JCAAware
        Returns the Java Cryptography Architecture (JCA) context. May be used to set a specific JCA security provider or secure random generator.
        Specified by:
        getJCAContext in interface JCAAware<JCAContext>
        Returns:
        The JCA context. Not null.
      • createJWSVerifier

        public JWSVerifier createJWSVerifier​(JWSHeader header,
                                             java.security.Key key)
                                      throws JOSEException
        Description copied from interface: JWSVerifierFactory
        Creates a new JWS verifier for the specified header and key.
        Specified by:
        createJWSVerifier in interface JWSVerifierFactory
        Parameters:
        header - The JWS header. Not null.
        key - The key intended to verify the JWS message. Not null.
        Returns:
        The JWS verifier.
        Throws:
        JOSEException - If the JWS algorithm is not supported or the key type or length doesn't match the expected for the JWS algorithm.