}
claimArray[2] = audience;
// TODO: make the validity period configurable
claimArray[3] = Long.toString( ( System.currentTimeMillis()/1000 ) + 300);
JWTToken token = null;
if ("RS256".equals(algorithm)) {
token = new JWTToken("RS256", claimArray);
signToken(token);
}
else {
// log inappropriate alg
}