Updated JWT library with class descriptions and better features names.

JWT library fixed to use agorithms names in upper case.
Updated README.
This commit is contained in:
2018-11-16 19:26:12 +01:00
parent 7f36e539f1
commit 4f8341e04e
9 changed files with 53 additions and 18 deletions

View File

@@ -57,6 +57,22 @@ feature -- Test
assert ("signature", jwt.encoded_string ("secret").same_string ("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.pcHcZspUvuiqIPVB_i_qmcvCJv63KLUgIAKIlXI1gY8"))
end
test_jwt_alg_caseless
local
jwt: JWS
ut: JWT_UTILITIES
do
create jwt
jwt.set_algorithm ("HS256")
assert("HS256", jwt.algorithm.same_string ("HS256"))
create jwt
jwt.set_algorithm ("hs256")
assert("hs256", jwt.algorithm.same_string ("HS256"))
create jwt
jwt.set_algorithm ("None")
assert("None", jwt.algorithm.same_string ("none"))
end
test_jwt
local
jwt: JWS