mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-10 16:27:26 +02:00
aliased and soft-deprecated NewToken with NewJWT, added encrypt/decrypt goja bindings and other minor doc changes
This commit is contained in:
1 parent
ecdf9c26cd
commit
2cb642bbf7
11 files changed
+5158
-5051
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user