aliased and soft-deprecated NewToken with NewJWT, added encrypt/decrypt goja bindings and other minor doc changes

This commit is contained in:
Gani Georgiev
2023-06-28 22:54:13 +03:00
parent ecdf9c26cd
commit 2cb642bbf7
11 changed files with 5158 additions and 5051 deletions
+3 -3
View File
@@ -125,7 +125,7 @@ func TestParseJWT(t *testing.T) {
}
}
func TestNewToken(t *testing.T) {
func TestNewJWT(t *testing.T) {
scenarios := []struct {
claims jwt.MapClaims
key string
@@ -141,9 +141,9 @@ func TestNewToken(t *testing.T) {
}
for i, scenario := range scenarios {
token, tokenErr := security.NewToken(scenario.claims, scenario.key, scenario.duration)
token, tokenErr := security.NewJWT(scenario.claims, scenario.key, scenario.duration)
if tokenErr != nil {
t.Errorf("(%d) Expected NewToken to succeed, got error %v", i, tokenErr)
t.Errorf("(%d) Expected NewJWT to succeed, got error %v", i, tokenErr)
continue
}