Class KJUR.jws.JWSJS
Version
1.0 (18 May 2012).
JSON Web Signature JSON Serialization (JWSJS) class
Defined in: jwsjs-2.0.js.
Constructor Attributes | Constructor Name and Description |
---|---|
JSON Web Signature JSON Serialization (JWSJS) class.
|
Field Attributes | Field Name and Description |
---|---|
array of Encoded JWS Headers
|
|
array of Encoded JWS signature value
|
|
Encoded JWS payload
|
Method Attributes | Method Name and Description |
---|---|
<static> |
KJUR.jws.JWSJS.addSignatureByHeaderKey(sHead, sPemPrvKey)
add a signature to existing JWS-JS by Header and PKCS1 private key.
|
<static> |
KJUR.jws.JWSJS.addSignatureByHeaderPayloadKey(sHead, sPayload, sPemPrvKey)
add a signature to existing JWS-JS by Header, Payload and PKCS1 private key.
|
<static> |
KJUR.jws.JWSJS.getJSON()
get JSON object for this JWS-JS object.
|
<static> |
KJUR.jws.JWSJS.init()
(re-)initialize this object.
|
<static> |
KJUR.jws.JWSJS.initWithJWS(sJWS)
(re-)initialize and set first signature with JWS.
|
<static> |
KJUR.jws.JWSJS.isEmpty()
check if this JWS-JS object is empty.
|
<static> |
KJUR.jws.JWSJS.raedJWSJS(string)
read JWS-JS string.
|
<static> |
KJUR.jws.JWSJS.verifyWithCerts(aCert)
verify JWS-JS object with array of certificate string.
|
Class Detail
KJUR.jws.JWSJS()
JSON Web Signature JSON Serialization (JWSJS) class.
Author: Kenji Urushima.
Author: Kenji Urushima.
- Requires:
- base64x.js, json-sans-eval.js, jws.js and jsrsasign library
Field Detail
{array of String}
aHeader
array of Encoded JWS Headers
{array of String}
aSignature
array of Encoded JWS signature value
{String}
sPayload
Encoded JWS payload
Method Detail
<static>
KJUR.jws.JWSJS.addSignatureByHeaderKey(sHead, sPemPrvKey)
add a signature to existing JWS-JS by Header and PKCS1 private key.
- Parameters:
- {String} sHead
- JSON string of JWS Header for adding signature.
- {String} sPemPrvKey
- string of PKCS1 private key
<static>
KJUR.jws.JWSJS.addSignatureByHeaderPayloadKey(sHead, sPayload, sPemPrvKey)
add a signature to existing JWS-JS by Header, Payload and PKCS1 private key.
This is to add first signature to JWS-JS object.
This is to add first signature to JWS-JS object.
- Parameters:
- {String} sHead
- JSON string of JWS Header for adding signature.
- {String} sPayload
- string of JWS Payload for adding signature.
- {String} sPemPrvKey
- string of PKCS1 private key
<static>
KJUR.jws.JWSJS.getJSON()
get JSON object for this JWS-JS object.
<static>
KJUR.jws.JWSJS.init()
(re-)initialize this object.
<static>
KJUR.jws.JWSJS.initWithJWS(sJWS)
(re-)initialize and set first signature with JWS.
- Parameters:
- {String} sJWS
- JWS signature to set
<static>
KJUR.jws.JWSJS.isEmpty()
check if this JWS-JS object is empty.
- Returns:
- 1 if there is no signatures in this object, otherwise 0.
<static>
KJUR.jws.JWSJS.raedJWSJS(string)
read JWS-JS string.
- Parameters:
- {String} string
- of JWS-JS to load.
<static>
KJUR.jws.JWSJS.verifyWithCerts(aCert)
verify JWS-JS object with array of certificate string.
- Parameters:
- {array of String} aCert
- array of string for X.509 PEM certificate.
- Returns:
- 1 if signature is valid.