chatgpt/pseudo-code

28 lines
504 B
Plaintext
Raw Permalink Normal View History

2022-12-17 22:39:21 +02:00
my-web-auth-part.code
open http listerner
pre_delivered_public_key = 123456789
if reguest get to /auth
check for json post data
post data:
{
person: {
user: username
token: token
},
signature: {
signature: ecdsa_signature
curve: curve
}
}
if ecdsa.verify( username+token, pre_delivered_public_key )
then
print "allow"
return "{ status: success }"
else
print "deny from: ", user
return "{ status: ", failure }"