public ClaimsIdentity ToClaimsIdentity(string nameClaimType = null, string roleClaimType = null)
{
var claims = this.Claims
.AllKeys
.SelectMany(key => this.Claims.GetValues(key)
.Select(value => new { Key = key, Value = value }))
.Select(keyValue => new Claim(keyValue.Key, keyValue.Value));
return new ClaimsIdentity(claims, "OAUTH-SWT",
nameClaimType ?? ClaimTypes.Name, roleClaimType ?? ClaimTypes.Role);
}