Denver Naidoo
Denver Naidoo

Reputation: 142

Sign Identity Server 4 tokens using HS256

I have an existing api that generates and uses jwt's with a header as follows

{
  "typ": "JWT",
  "alg": "HS256"
}

The api uses JWT bearer authentication

app.UseJwtBearerAuthentication(new JwtBearerAuthenticationOptions
{
    AuthenticationMode = AuthenticationMode.Active,
    AllowedAudiences = new[] { "Any" },
    IssuerSecurityTokenProviders = new IIssuerSecurityTokenProvider[]
    {
        new SymmetricKeyIssuerSecurityTokenProvider(issuer, secret)
    }
});

I now want to use identity server for a client I want to integrate with. How can I get Identity server to sign the token in the way that the existing api expects it (HS256).

Upvotes: 1

Views: 566

Answers (1)

leastprivilege
leastprivilege

Reputation: 18482

IdentityServer does not support symmetric keys.

Upvotes: 5

Related Questions