I'm fairly new to `JwtSecurityTokens`, and I try to understand the different aspects of it and furhtermore the whole `claimsidentity` and `claimprincipal`, but that's another story.

I try to generate a token in **C#** by using the following code:

```
private const string SECRET_KEY = "abcdef";
private static readonly SymmetricSecurityKey SIGNING_KEY = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(SECRET_KEY));

    public static string GenerateToken(string someName)
    {
        var token = new JwtSecurityToken(
            claims: new Claim[]
            {
                new Claim(ClaimTypes.Name, someName), 
            },
            notBefore: new DateTimeOffset(DateTime.Now).DateTime,
            expires: new DateTimeOffset(DateTime.Now.AddMinutes(60)).DateTime,
            signingCredentials: new SigningCredentials(SIGNING_KEY, SecurityAlgorithms.HmacSha256)
        );

        return new JwtSecurityTokenHandler().WriteToken(token);
    }

```

> 
> I followed a tutorial on Youtube, but I'm not sure I understand the
>  different parts in the JwtSecurityToken. In addition, when I execute
>  the code through a controller just to try to return a token, it
>  returns an error, saying: "IDX10603: Decryption failed. Keys tried:
>  '[PII is hidden]'".
> 
> 
> 

Any help is appreciated.