This repository was archived by the owner on May 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ To generate a random secret, you could use the following command:
20
20
openssl rand -base64 32
21
21
{{< /highlight >}}
22
22
23
+ To create a claim, follow the JWT standard to create a claim and sign it with your secret.
24
+
23
25
Example claim:
24
26
25
27
{{<highlight json >}}
@@ -28,7 +30,7 @@ Example claim:
28
30
"aud": "chirpstack-application-server", // audience for which the claim is intended
29
31
"nbf": 1489566958, // unix time from which the token is valid
30
32
"exp": 1489653358, // unix time when the token expires
31
- "sub": "user", // subject of the claim (an user)
33
+ "sub": "user", // subject of the claim (a user)
32
34
"username": "admin" // username the client claims to be
33
35
}
34
36
{{< /highlight >}}
@@ -46,4 +48,4 @@ method.
46
48
47
49
For requests to the RESTful JSON interface, you need to set the JWT token
48
50
using the ` Grpc-Metadata-Authorization ` header field. The token needs to
49
- be present for each request.
51
+ be present for each request. For example as a cURL header ` --header "Grpc-Metadata-Authorization: Bearer <jwt token>" `
You can’t perform that action at this time.
0 commit comments