Class JWEDecryptionKeySelector<C extends SecurityContext>

    • Constructor Detail

      • JWEDecryptionKeySelector

        public JWEDecryptionKeySelector​(JWEAlgorithm jweAlg,
                                        EncryptionMethod jweEnc,
                                        JWKSource<C> jwkSource)
        Creates a new decryption key selector.
        Parameters:
        jweAlg - The expected JWE algorithm for the objects to be decrypted. Must not be null.
        jweEnc - The expected JWE encryption method for the objects to be decrypted. Must not be null.
        jwkSource - The JWK source. Must include the private keys and must not be null.
    • Method Detail

      • createJWKMatcher

        protected JWKMatcher createJWKMatcher​(JWEHeader jweHeader)
        Creates a JWK matcher for the expected JWE algorithms and the specified JWE header.
        Parameters:
        jweHeader - The JWE header. Must not be null.
        Returns:
        The JWK matcher, null if none could be created.
      • getJWKSource

        public JWKSource<C> getJWKSource()
        Returns the JWK source.
        Returns:
        The JWK source.