I'm using the ASP.Net OpenID Connect Server project (ASOS) to create and consume JWTs for my WebAPI.
I'm now trying to perform various validations on the token.
I'd like to know how to check the "alg" type. I'm aware of an issue where "none" can be passed in, which means that someone can forge the tokens (I'm not sure if it's just specific libraries that have the issue, or if it's just generally good practice to check, but I'd feel safer if I was performing that check).
Also, how can I verify the integrity of the JWT?
Currently my token issuer and WebAPI are in the same project so I'm guessing that it's checked for me automatically? Or is it not checked at all?
My understanding is that some kind of signing credential is added for you on disk if you don't specify any (Not sure where I read that).
Would providing some kind of signing credential automatically update the "alg" property?
What if my token issuer is on 1 server and my WebAPI was somewhere completely different. How would I go about validating that the token came from my token issuer and hadn't been interfered with.
Presumably I'd have to add a certificate manually, then share the public key somehow? If that's the case, could someone point me to where I should add the public key to check the JWT integrity? Presumably this part is more about asp.net Core than OpenIDConnect Server (ASOS)?
Thanks.