Jwt.encode constructor
Jwt.encode(})
Implementation
factory Jwt.encode(String key, Map<String, String?> claims, {String subject = "jwt", String issuer = "fml.client", List<String>? audience, int shelflife = 60})
{
// we could have done this quite simply ourselves, however, for the sake of time, use package
// future todo - encode ourselves
final myClaims = JwtClaim(subject: subject, issuer: issuer, audience: audience, otherClaims: claims, maxAge: Duration(minutes: shelflife));
String token = issueJwtHS256(myClaims, key);
return Jwt(token);
}