public JwtTokenModel CreateJwtToken(IEnumerable <Claim> claims)
        {
            JsonExtensions.Serializer   = JsonConvert.SerializeObject;
            JsonExtensions.Deserializer = JsonConvert.DeserializeObject;
            var jwtSecurityTokenHandler = new JwtSecurityTokenHandler();
            var subject = new ClaimsIdentity();

            foreach (var claim in claims)
            {
                subject.AddClaim(claim);
            }

            var signingCredentials = new SigningCredentials(new SymmetricSecurityKey(_signatureProvider.GetSecretInBytes()), SecurityAlgorithms.HmacSha256Signature);

            var expDateTime = DateTime.UtcNow.AddHours(_jwtHelperConfiguration.TokenExpiryInHours);

            var jwtToken = jwtSecurityTokenHandler.CreateJwtSecurityToken(
                _jwtHelperConfiguration.SystemIdentityProviderIssuerValue,
                _jwtHelperConfiguration.SystemServicesAudienceValue,
                subject,
                DateTime.UtcNow,
                expDateTime,
                DateTime.UtcNow,
                signingCredentials);
            var tokenString = jwtToken.EncodedHeader + "." + jwtToken.EncodedPayload + "." + jwtToken.RawSignature;

            return(new JwtTokenModel
            {
                Jwt = tokenString,
                JwtExpiryDateTime = expDateTime.ToString(CultureInfo.InvariantCulture)
            });
        }