equal
deleted
inserted
replaced
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 |