initial save of my chatGPT coding
This commit is contained in:
27
pseudo-code
Normal file
27
pseudo-code
Normal file
@ -0,0 +1,27 @@
|
||||
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 }"
|
Reference in New Issue
Block a user