diff --git a/library/security/jwt/src/jws.e b/library/security/jwt/src/jws.e index 37067915..82a7578a 100644 --- a/library/security/jwt/src/jws.e +++ b/library/security/jwt/src/jws.e @@ -1,6 +1,5 @@ note description: "Summary description for {JWS}." - author: "" date: "$Date$" revision: "$Revision$" @@ -9,19 +8,35 @@ class inherit JWT + redefine + default_create + end JWT_UTILITIES - undefine + redefine default_create end create default_create, + make_with_algorithm, make_with_claims, make_with_json_payload feature {NONE} -- Initialization + default_create + do + Precursor {JWT} + set_algorithm_to_hs256 + end + + make_with_algorithm (alg: like algorithm) + do + default_create + set_algorithm (alg) + end + make_with_claims (tb: STRING_TABLE [READABLE_STRING_GENERAL]) do default_create @@ -77,4 +92,14 @@ feature -- Element change header.set_algorithm (alg) end + set_algorithm_to_hs256 + do + set_algorithm (alg_hs256) + end + + set_algorithm_to_none + do + set_algorithm (alg_none) + end + end