generate method
Creates a new JWT token with a payload represented by payload
.
Implementation
String generate(JwtPayload payload) {
var headerBase64 = _serializeHeader();
var payloadBase64 = _serializePayload(payload);
var signature = _sign(headerBase64, payloadBase64);
var ret = '$headerBase64.$payloadBase64.$signature';
return ret;
}