|
||||||||||
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.DefaultJWEHeaderFilter
@ThreadSafe public class DefaultJWEHeaderFilter
JSON Web Encryption (JWE) header filter implementation. Intended to be
incorporated by JWEDecrypter
implementations. This class is
thread-safe.
Constructor Summary | |
---|---|
DefaultJWEHeaderFilter(Set<JWEAlgorithm> algs,
Set<EncryptionMethod> encs)
Creates a new JWE header filter. |
|
DefaultJWEHeaderFilter(Set<JWEAlgorithm> algs,
Set<EncryptionMethod> encs,
Set<String> acceptedParams)
Creates a new JWE header filter. |
Method Summary | |
---|---|
Set<JWEAlgorithm> |
getAcceptedAlgorithms()
Gets the names of the accepted JWE algorithms. |
Set<EncryptionMethod> |
getAcceptedEncryptionMethods()
Gets the names of the accepted encryption methods. |
void |
setAcceptedAlgorithms(Set<JWEAlgorithm> acceptedAlgs)
Sets the names of the accepted JWE algorithms. |
void |
setAcceptedEncryptionMethods(Set<EncryptionMethod> acceptedEncs)
Sets the names of the accepted encryption methods. |
void |
setAcceptedParameters(Set<String> acceptedParams)
Sets the names of the accepted header parameters. |
Set<JWEAlgorithm> |
supportedAlgorithms()
Returns the names of the supported JWE algorithms. |
Set<EncryptionMethod> |
supportedEncryptionMethods()
Returns the names of the supported encryption methods. |
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 DefaultJWEHeaderFilter(Set<JWEAlgorithm> algs, Set<EncryptionMethod> encs)
JWEHeader.getReservedParameterNames()
.
algs
- The supported JWE algorithms. Used to bound the
accepted algorithms
. Must
not be null
.encs
- The supported encryption methods. Used to bound the
accepted encryption
methods
. Must not be null
.public DefaultJWEHeaderFilter(Set<JWEAlgorithm> algs, Set<EncryptionMethod> encs, Set<String> acceptedParams)
algs
- The supported JWE algorithms. Used to bound
the accepted
algorithms
. Must not be null
.encs
- The supported encryption methods. Used to
bound the accepted encryption methods
. Must not be
null
.acceptedParams
- The accepted JWE header parameters. Must
contain at least the alg
and
enc
parameters. Must not be
null
.Method Detail |
---|
public Set<JWEAlgorithm> supportedAlgorithms()
accepted algorithms
.
public Set<JWEAlgorithm> getAcceptedAlgorithms()
JWEHeaderFilter
alg
JWE header parameter.
getAcceptedAlgorithms
in interface JWEHeaderFilter
public void setAcceptedAlgorithms(Set<JWEAlgorithm> acceptedAlgs)
JWEHeaderFilter
alg
JWE header parameter.
setAcceptedAlgorithms
in interface JWEHeaderFilter
acceptedAlgs
- The accepted JWE algorithms. Must be a subset of
the supported algorithms and not null
.public Set<EncryptionMethod> supportedEncryptionMethods()
accepted encryption
methods
.
public Set<EncryptionMethod> getAcceptedEncryptionMethods()
JWEHeaderFilter
enc
JWE header parameter.
getAcceptedEncryptionMethods
in interface JWEHeaderFilter
public void setAcceptedEncryptionMethods(Set<EncryptionMethod> acceptedEncs)
JWEHeaderFilter
enc
JWE header parameter.
setAcceptedEncryptionMethods
in interface JWEHeaderFilter
acceptedEncs
- The accepted encryption methods. Must be a
subset of the supported encryption methods 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 |