- java.lang.Object
-
- com.appslandia.common.base.InitializeObject
-
- com.appslandia.common.jwt.JwtSigner
-
- All Implemented Interfaces:
InitializeSupport
public class JwtSigner extends InitializeObject
- Author:
- Loc Ha
-
-
Constructor Summary
Constructors Constructor Description JwtSigner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JwtSignercopy()StringgetAlg()StringgetKid()DigestergetSigner()protected voidinit()JwtSignersetAlg(String alg)JwtSignersetKid(String kid)JwtSignersetSigner(DsaDigester signer)JwtSignersetSigner(MacDigester signer)byte[]sign(byte[] message)booleanverify(byte[] message, byte[] signature)-
Methods inherited from class com.appslandia.common.base.InitializeObject
assertNotInitialized, destroy, initialize
-
-
-
-
Field Detail
-
NONE
public static final JwtSigner NONE
-
-
Method Detail
-
init
protected void init() throws Exception- Specified by:
initin classInitializeObject- Throws:
Exception
-
sign
public byte[] sign(byte[] message) throws CryptoException- Throws:
CryptoException
-
verify
public boolean verify(byte[] message, byte[] signature) throws CryptoException- Throws:
CryptoException
-
getAlg
public String getAlg()
-
getSigner
public Digester getSigner()
-
setSigner
public JwtSigner setSigner(MacDigester signer)
-
setSigner
public JwtSigner setSigner(DsaDigester signer)
-
getKid
public String getKid()
-
copy
public JwtSigner copy()
-
-