public class CriticalHeaderParamsDeferral extends Object
crit
) header parameters deferral policy.CriticalHeaderParamsAware
Constructor and Description |
---|
CriticalHeaderParamsDeferral() |
Modifier and Type | Method and Description |
---|---|
void |
ensureHeaderPasses(JWEHeader header)
Throws a JOSE exception if the specified JWE header doesn't pass the
critical header parameters check.
|
Set<String> |
getDeferredCriticalHeaderParams()
Returns the names of the critical (
crit ) header parameters
that are deferred to the application for processing. |
Set<String> |
getProcessedCriticalHeaderParams()
Returns the names of the critical (
crit ) header parameters
that are understood and processed. |
boolean |
headerPasses(Header header)
Returns
true if the specified header passes the critical
parameters check. |
void |
setDeferredCriticalHeaderParams(Set<String> defCritHeaders)
Sets the names of the critical (
crit ) header parameters
that are deferred to the application for processing. |
public CriticalHeaderParamsDeferral()
public Set<String> getProcessedCriticalHeaderParams()
crit
) header parameters
that are understood and processed.public Set<String> getDeferredCriticalHeaderParams()
crit
) header parameters
that are deferred to the application for processing.public void setDeferredCriticalHeaderParams(Set<String> defCritHeaders)
crit
) header parameters
that are deferred to the application for processing.defCritHeaders
- The names of the critical header parameters
that are deferred to the application for
processing, empty set or null
if none.public boolean headerPasses(Header header)
true
if the specified header passes the critical
parameters check.header
- The JWS or JWE header to check. Must not be
null
.true
if the header passes, false
if the
header contains one or more critical header parameters which
are not marked for deferral to the application.public void ensureHeaderPasses(JWEHeader header) throws JOSEException
header
- The JWE header to check. Must not be null
.JOSEException
- If the JWE header doesn't pass the check.Copyright © 2020 Connect2id Ltd.. All rights reserved.