@ThreadSafe public class JWEDecryptionKeySelector<C extends SecurityContext> extends Object implements JWEKeySelector<C>
JSON Web Key (JWK) source.| Constructor and Description |
|---|
JWEDecryptionKeySelector(JWEAlgorithm jweAlg,
EncryptionMethod jweEnc,
JWKSource<C> jwkSource)
Creates a new decryption key selector.
|
| Modifier and Type | Method and Description |
|---|---|
protected JWKMatcher |
createJWKMatcher(JWEHeader jweHeader)
Creates a JWK matcher for the expected JWE algorithms and the
specified JWE header.
|
JWEAlgorithm |
getExpectedJWEAlgorithm()
Returns the expected JWE algorithm.
|
EncryptionMethod |
getExpectedJWEEncryptionMethod()
The expected JWE encryption method.
|
JWKSource<C> |
getJWKSource()
Returns the JWK source.
|
List<Key> |
selectJWEKeys(JWEHeader jweHeader,
C context)
Selects key candidates for decrypting a JWE object.
|
public JWEDecryptionKeySelector(JWEAlgorithm jweAlg, EncryptionMethod jweEnc, JWKSource<C> jwkSource)
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.public JWEAlgorithm getExpectedJWEAlgorithm()
public EncryptionMethod getExpectedJWEEncryptionMethod()
protected JWKMatcher createJWKMatcher(JWEHeader jweHeader)
jweHeader - The JWE header. Must not be null.null if none could be created.public List<Key> selectJWEKeys(JWEHeader jweHeader, C context)
JWEKeySelectorselectJWEKeys in interface JWEKeySelector<C extends SecurityContext>jweHeader - The header of the JWE object. Must not be
null.context - Optional context of the JWE object, null if
not required.public JWKSource<C> getJWKSource()
Copyright © 2016 Connect2id Ltd.. All rights reserved.