|
@@ -270,6 +270,13 @@ function Util:process_and_verify_token(session, acceptedIssuers)
|
270
|
270
|
if kid == nil then
|
271
|
271
|
return false, "not-allowed", "'kid' claim is missing";
|
272
|
272
|
end
|
|
273
|
+ local alg = header["alg"];
|
|
274
|
+ if alg == nil then
|
|
275
|
+ return false, "not-allowed", "'alg' claim is missing";
|
|
276
|
+ end
|
|
277
|
+ if alg.sub(alg,1,2) ~= "RS" then
|
|
278
|
+ return false, "not-allowed", "'kid' claim only support with RS family";
|
|
279
|
+ end
|
273
|
280
|
pubKey = self:get_public_key(kid);
|
274
|
281
|
if pubKey == nil then
|
275
|
282
|
return false, "not-allowed", "could not obtain public key";
|