// Parse required claims
Issuer iss = new Issuer(JSONObjectUtils.getString(jsonObject, "iss"));
Subject sub = new Subject(JSONObjectUtils.getString(jsonObject, "sub"));
Audience aud;
if (jsonObject.get("aud") instanceof String) {
aud = new Audience(JSONObjectUtils.getString(jsonObject, "aud"));
} else {
String[] audList = JSONObjectUtils.getStringArray(jsonObject, "aud");
if (audList.length > 1)
throw new ParseException("Multiple audiences (aud) not supported");
aud = new Audience(audList[0]);
}
Date exp = DateUtils.fromSecondsSinceEpoch(JSONObjectUtils.getLong(jsonObject, "exp"));