private string CreateWSPayload(JsonWebToken.Payload.WebserviceResponse response) { var iat = (int)(System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds; var jwtContainer = new JsonWebToken.Payload() { Issuer = issuer, Audience = "google", Type = "loyaltywebservice", IssuedAtTimeSeconds = iat, Objects = new JsonWebToken.Payload.Content() { loyaltyObjects = loyaltyObjects, offerObjects = offerObjects, webserviceResponse = response }, }; return(NewtonsoftJsonSerializer.Instance.Serialize(jwtContainer)); }
private string CreateSerializedPayload() { var iat = (int)(System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds; var jwtContainer = new JsonWebToken.Payload() { Issuer = issuer, Audience = "google", Type = "savetowallet", IssuedAtTimeSeconds = iat, Objects = new JsonWebToken.Payload.Content() { loyaltyObjects = loyaltyObjects, offerObjects = offerObjects, giftCardObjects = giftCardObjects }, Origins = origins //Origins = new []{"http://localhost:59113"} }; return(NewtonsoftJsonSerializer.Instance.Serialize(jwtContainer)); }