Comparison

mod_http_oauth2/mod_http_oauth2.lua @ 5391:4aedce4fb95d

mod_http_oauth2: Fix accidental uppercase in invocation of hash function Thanks auto-complete!
author Kim Alvefur <zash@zash.se>
date Sun, 30 Apr 2023 16:41:30 +0200
parent 5390:f2363e6d9a64
child 5392:c0a6f39caf47
comparison
equal deleted inserted replaced
5390:f2363e6d9a64 5391:4aedce4fb95d
399 return code_verifier; 399 return code_verifier;
400 end 400 end
401 401
402 function verifier_transforms.S256(code_verifier) 402 function verifier_transforms.S256(code_verifier)
403 -- code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier))) 403 -- code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier)))
404 return code_verifier and b64url(hashes.SHA256(code_verifier)); 404 return code_verifier and b64url(hashes.sha256(code_verifier));
405 end 405 end
406 406
407 -- Used to issue/verify short-lived tokens for the authorization process below 407 -- Used to issue/verify short-lived tokens for the authorization process below
408 local new_user_token, verify_user_token = jwt.init("HS256", random.bytes(32), nil, { default_ttl = 600 }); 408 local new_user_token, verify_user_token = jwt.init("HS256", random.bytes(32), nil, { default_ttl = 600 });
409 409