@ThreadSafe public class DefaultJWSHeaderFilter extends java.lang.Object implements JWSHeaderFilter
JWSVerifier
implementations. This class is
thread-safe.Constructor and Description |
---|
DefaultJWSHeaderFilter(java.util.Set<JWSAlgorithm> algs)
Creates a new JWS header filter.
|
DefaultJWSHeaderFilter(java.util.Set<JWSAlgorithm> algs,
java.util.Set<java.lang.String> acceptedParams)
Creates a new JWS header filter.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<JWSAlgorithm> |
getAcceptedAlgorithms()
Gets the names of the accepted JWS algorithms.
|
java.util.Set<java.lang.String> |
getAcceptedParameters()
Gets the names of the accepted header parameters.
|
void |
setAcceptedAlgorithms(java.util.Set<JWSAlgorithm> acceptedAlgs)
Sets the names of the accepted JWS algorithms.
|
void |
setAcceptedParameters(java.util.Set<java.lang.String> params)
Sets the names of the accepted header parameters.
|
java.util.Set<JWSAlgorithm> |
supportedAlgorithms()
Returns the names of the supported JWS algorithms.
|
public DefaultJWSHeaderFilter(java.util.Set<JWSAlgorithm> algs)
JWSHeader.getReservedParameterNames()
.algs
- The supported JWS algorithms. Used to bound
the accepted
algorithms
. Must not be null
.public DefaultJWSHeaderFilter(java.util.Set<JWSAlgorithm> algs, java.util.Set<java.lang.String> acceptedParams)
algs
- The supported JWS algorithms. Used to bound
the accepted
algorithms
. Must not be null
.acceptedParams
- The accepted JWS header parameters. Must
contain at least the alg
parameter and
must not be null
.public java.util.Set<JWSAlgorithm> supportedAlgorithms()
accepted algorithms
.public java.util.Set<JWSAlgorithm> getAcceptedAlgorithms()
JWSHeaderFilter
alg
JWS header parameter.getAcceptedAlgorithms
in interface JWSHeaderFilter
public void setAcceptedAlgorithms(java.util.Set<JWSAlgorithm> acceptedAlgs)
JWSHeaderFilter
alg
JWS header parameter.setAcceptedAlgorithms
in interface JWSHeaderFilter
acceptedAlgs
- The accepted JWS algorithms. Must be a subset of
the supported algorithms and not null
.public java.util.Set<java.lang.String> getAcceptedParameters()
HeaderFilter
getAcceptedParameters
in interface HeaderFilter
alg
parameter for JWS headers
or the alg
and / or enc
parameters for JWE
headers.public void setAcceptedParameters(java.util.Set<java.lang.String> params)
HeaderFilter
setAcceptedParameters
in interface HeaderFilter
params
- The accepted header parameters. Must contain at least
the alg
parameter for JWS headers or the
alg
and / or enc
parameters for JWE
headers.Copyright © 2013 NimbusDS. All Rights Reserved.