Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generating a LF Auth Token
public String JWToken {
get
{
var network = ConfigurationManager.AppSettings["livefyreNetwork"];
var payload = new Dictionary<string, object>()
{ { "domain", network },
{ "user_id", Info.ID },
{ "expires", DateTime.Now.AddDays(7).Ticks },
{ "display_name", Info.GetDisplayName()}
};
var secretKey = ConfigurationManager.AppSettings["livefyreNetworkSecretKey"];
return JWT.JsonWebToken.Encode(payload, secretKey, JWT.JwtHashAlgorithm.HS256);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment