|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.jose.Header com.nimbusds.jose.CommonSEHeader
public abstract class CommonSEHeader
Common class for JWS and JWE headers.
Supports all reserved header parameters shared by the JWS and JWE specifications:
Field Summary |
---|
Fields inherited from class com.nimbusds.jose.Header |
---|
alg |
Constructor Summary | |
---|---|
protected |
CommonSEHeader(Algorithm alg)
Creates a new common JWS and JWE header with the specified algorithm ( alg ) parameter. |
Method Summary | |
---|---|
JWK |
getJWK()
Gets the JSON Web Key (JWK) ( jwk ) parameter. |
URL |
getJWKURL()
Gets the JSON Web Key (JWK) Set URL ( jku ) parameter. |
String |
getKeyID()
Gets the key ID ( kid ) parameter. |
Base64[] |
getX509CertChain()
Gets the X.509 certificate chain parameter ( x5c )
corresponding to the key used to sign or encrypt the JWS/JWE object. |
Base64URL |
getX509CertThumbprint()
Gets the X.509 certificate thumbprint ( x5t ) parameter. |
URL |
getX509CertURL()
Gets the X.509 certificate URL ( x5u ) parameter. |
protected static Base64[] |
parseX509CertChain(net.minidev.json.JSONArray jsonArray)
Parses an X.509 certificate chain from the specified JSON array. |
void |
setJWK(JWK jwk)
Sets the JSON Web Key (JWK) ( jwk ) parameter. |
void |
setJWKURL(URL jku)
Sets the JSON Web Key (JWK) Set URL ( jku ) parameter. |
void |
setKeyID(String kid)
Sets the key ID ( kid ) parameter. |
void |
setX509CertChain(Base64[] x5c)
Sets the X.509 certificate chain parameter ( x5c )
corresponding to the key used to sign or encrypt the JWS/JWE object. |
void |
setX509CertThumbprint(Base64URL x5t)
Sets the X.509 certificate thumbprint ( x5t ) parameter. |
void |
setX509CertURL(URL x5u)
Sets the X.509 certificate URL ( x5u ) parameter. |
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of the header. |
Methods inherited from class com.nimbusds.jose.Header |
---|
getContentType, getCustomParameter, getCustomParameters, getType, parse, parseAlgorithm, setContentType, setCustomParameter, setCustomParameters, setParsedBase64URL, setType, toBase64URL, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.nimbusds.jose.ReadOnlyHeader |
---|
getAlgorithm, getContentType, getCustomParameter, getCustomParameters, getIncludedParameters, getType, toBase64URL, toString |
Constructor Detail |
---|
protected CommonSEHeader(Algorithm alg)
alg
) parameter.
alg
- The algorithm parameter. Must not be null
.Method Detail |
---|
public URL getJWKURL()
ReadOnlyCommonSEHeader
jku
) parameter.
getJWKURL
in interface ReadOnlyCommonSEHeader
null
if not
specified.public void setJWKURL(URL jku)
jku
) parameter.
jku
- The JSON Web Key (JWK) Set URL parameter, null
if
not specified.public JWK getJWK()
ReadOnlyCommonSEHeader
jwk
) parameter.
getJWK
in interface ReadOnlyCommonSEHeader
null
if not
specified.public void setJWK(JWK jwk)
jwk
) parameter.
jwk
- The JSON Web Key (JWK) (jwk
) parameter,
null
if not specified.public URL getX509CertURL()
ReadOnlyCommonSEHeader
x5u
) parameter.
getX509CertURL
in interface ReadOnlyCommonSEHeader
null
if not
specified.public void setX509CertURL(URL x5u)
x5u
) parameter.
x5u
- The X.509 certificate URL parameter, null
if not
specified.public Base64URL getX509CertThumbprint()
ReadOnlyCommonSEHeader
x5t
) parameter.
getX509CertThumbprint
in interface ReadOnlyCommonSEHeader
null
if
not specified.public void setX509CertThumbprint(Base64URL x5t)
x5t
) parameter.
x5t
- The X.509 certificate thumbprint parameter, null
if not specified.public Base64[] getX509CertChain()
ReadOnlyCommonSEHeader
x5c
)
corresponding to the key used to sign or encrypt the JWS/JWE object.
getX509CertChain
in interface ReadOnlyCommonSEHeader
null
if not
specified.public void setX509CertChain(Base64[] x5c)
x5c
)
corresponding to the key used to sign or encrypt the JWS/JWE object.
x5c
- The X.509 certificate chain parameter, null
if not
specified.public String getKeyID()
ReadOnlyCommonSEHeader
kid
) parameter.
getKeyID
in interface ReadOnlyCommonSEHeader
null
if not specified.public void setKeyID(String kid)
kid
) parameter.
kid
- The key ID parameter, null
if not specified.public net.minidev.json.JSONObject toJSONObject()
ReadOnlyHeader
toJSONObject
in interface ReadOnlyHeader
toJSONObject
in class Header
protected static Base64[] parseX509CertChain(net.minidev.json.JSONArray jsonArray) throws ParseException
jsonArray
- The JSON array to parse. Must not be null
.
ParseException
- If the X.509 certificate chain couldn't be
parsed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |