@lango-project/lango-server 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/token.lango CHANGED
@@ -4,9 +4,9 @@ import js global Object
4
4
 
5
5
  export class Token(claims, readonly = false)
6
6
  properties
7
- clientId
8
- auth
9
- expiresAt
7
+ clientId?
8
+ auth?
9
+ expiresAt?
10
10
  methods
11
11
  AddAuth(permission)
12
12
  clearAuth()
@@ -24,6 +24,16 @@ Token(claims, readonly = false)
24
24
  @clientId = claims.clientId
25
25
  @auth = claims.auth
26
26
  @expiresAt = claims.exp
27
+ Object/freeze(@this)
28
+
29
+ Token:clientId?
30
+ return @clientId
31
+
32
+ Token:auth?
33
+ return @auth
34
+
35
+ Token:expiresAt?
36
+ return @expiresAt
27
37
 
28
38
  Token:AddAuth(permission)
29
39
  writable()