Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/JwksFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ protected virtual void LoadKeySet(JsonWebKeySetResponse keySet) {

if (JwtAuthProvider.RequireHashAlgorithm) {
// infer the algorithm if it is described by a key from the set
var algo = keySet.Keys.FirstOrDefault(x => !string.IsNullOrEmpty(x.Algorithm))? .Algorithm;
if (algo != null) {
JwtAuthProvider.HashAlgorithm = algo;
}
var algo = keySet.Keys.FirstOrDefault(x => !string.IsNullOrEmpty(x.Algorithm))?.Algorithm;
JwtAuthProvider.HashAlgorithm = algo ?? "RS256";
}

var key = keySet.Keys.First();
Expand Down