|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.jose.DefaultHeaderFilter com.nimbusds.jose.DefaultJWSHeaderFilter
@ThreadSafe public class DefaultJWSHeaderFilter
JSON Web Signature (JWS) header filter implementation. Intended to be
incorporated by JWSVerifier
implementations. This class is
thread-safe.
Constructor Summary | |
---|---|
DefaultJWSHeaderFilter(Set<JWSAlgorithm> algs)
Creates a new JWS header filter. |
|
DefaultJWSHeaderFilter(Set<JWSAlgorithm> algs,
Set<String> acceptedParams)
Creates a new JWS header filter. |
Method Summary | |
---|---|
Set<JWSAlgorithm> |
getAcceptedAlgorithms()
Gets the names of the accepted JWS algorithms. |
void |
setAcceptedAlgorithms(Set<JWSAlgorithm> acceptedAlgs)
Sets the names of the accepted JWS algorithms. |
void |
setAcceptedParameters(Set<String> acceptedParams)
Sets the names of the accepted header parameters. |
Set<JWSAlgorithm> |
supportedAlgorithms()
Returns the names of the supported JWS algorithms. |
Methods inherited from class com.nimbusds.jose.DefaultHeaderFilter |
---|
getAcceptedParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.nimbusds.jose.HeaderFilter |
---|
getAcceptedParameters |
Constructor Detail |
---|
public DefaultJWSHeaderFilter(Set<JWSAlgorithm> algs)
JWSHeader.getReservedParameterNames()
.
algs
- The supported JWS algorithms. Used to bound the
accepted algorithms
. Must
not be null
.public DefaultJWSHeaderFilter(Set<JWSAlgorithm> algs, Set<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
.Method Detail |
---|
public Set<JWSAlgorithm> supportedAlgorithms()
accepted algorithms
.
public Set<JWSAlgorithm> getAcceptedAlgorithms()
JWSHeaderFilter
alg
JWS header parameter.
getAcceptedAlgorithms
in interface JWSHeaderFilter
public void setAcceptedAlgorithms(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 void setAcceptedParameters(Set<String> acceptedParams)
HeaderFilter
setAcceptedParameters
in interface HeaderFilter
setAcceptedParameters
in class DefaultHeaderFilter
acceptedParams
- The accepted header parameters. Must contain
at least the alg
parameter for JWS
headers or the alg
and enc
parameters for JWE headers. Must not be
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |