@ThreadSafe public class DefaultJWSVerifierFactory extends Object implements JWSVerifierFactory
Supports all standard JWS algorithms implemented in the
com.nimbusds.jose.crypto
package.
Modifier and Type | Field and Description |
---|---|
static Set<JWSAlgorithm> |
SUPPORTED_ALGORITHMS
The supported JWS algorithms.
|
Constructor and Description |
---|
DefaultJWSVerifierFactory() |
Modifier and Type | Method and Description |
---|---|
JWSVerifier |
createJWSVerifier(JWSHeader header,
Key key)
Creates a new JWS verifier for the specified header and key.
|
JCAContext |
getJCAContext()
Returns the Java Cryptography Architecture (JCA) context.
|
Set<JWSAlgorithm> |
supportedJWSAlgorithms()
Returns the names of the supported algorithms by the JWS provider
instance.
|
public static final Set<JWSAlgorithm> SUPPORTED_ALGORITHMS
public DefaultJWSVerifierFactory()
public Set<JWSAlgorithm> supportedJWSAlgorithms()
JWSProvider
alg
JWS header parameter.supportedJWSAlgorithms
in interface JWSProvider
public JCAContext getJCAContext()
JCAAware
getJCAContext
in interface JCAAware<JCAContext>
null
.public JWSVerifier createJWSVerifier(JWSHeader header, Key key) throws JOSEException
JWSVerifierFactory
createJWSVerifier
in interface JWSVerifierFactory
header
- The JWS header. Not null
.key
- The key intended to verify the JWS message. Not
null
.JOSEException
- If the JWS algorithm is not supported or the
key type or length doesn't match the expected
for the JWS algorithm.Copyright © 2019 Connect2id Ltd.. All rights reserved.