You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-10Lines changed: 18 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,37 +26,45 @@ sign
26
26
27
27
By default, some values will be set for you: `alg` will be `HS256`, `typ` equals `JWT`, and the `iat` field will be set to the creation timestamp. You _can_ override any for the above by providing the value explicitely.
28
28
29
-
You can also provide an `unregistered` claim, that will contain literally any [encodable](https://pursuit.purescript.org/packages/purescript-foreign-generic/10.0.0/docs/Foreign.Generic.Class#t:Encode) data:
29
+
You can also provide an `unregisteredClaims` record, each values of that record must be [encodable](https://pursuit.purescript.org/packages/purescript-foreign-generic/10.0.0/docs/Foreign.Generic.Class#t:Encode):
(defaultClaims { unregisteredClaims = Just { foo: "bar" } )
36
36
```
37
37
38
38
### Decode
39
39
40
-
If decode succeeds, it will return a `Token Unverified`you can read the headers and claims from it:
40
+
If decode succeeds, it will return a `Token r Unverified`where `r` is the row type of the `unregisteredClaims` record. You can read the headers and claims as follow:
0 commit comments