in the get /api/applications/{applicationID}/nodes
but applicationID =1 is exit int the database.
Please refer to: https://docs.loraserver.io/lora-app-server/integrate/auth/.
sorry about that,But the question is not solved.
As mentioned in the documentation, you need to provide the JWT token in the Grpc-Metadata-Authorization
header. In the API console, you can do this using the top-right input field.
The JWT token must be in the format as mentioned in that link (and of course signed using the same JWT secret as LoRa App Server is configured with). See also www.jwt.io for more information about JWT tokens
need jwttoken so you must generate the token and add it
No, you must use that secret to sign your JWT token. For convenience, you could use the /internal/login
api endpoint to generate a token (using login credentials).
Example token:
{
"iss": "lora-app-server", // issuer of the claim
"aud": "lora-app-server", // audience for which the claim is intended
"nbf": 1489566958, // unix time from which the token is valid
"exp": 1489653358, // unix time when the token expires
"sub": "user", // subject of the claim (an user)
"username": "admin" // username the client claims to be
}
Update the fields, paste it in jwt.io and use the JWT secret to sign it (or use any other JWT library available). The resulting token can then be used in the JWT token field.
Yeah,it works,Thanks a lot.
Hello @brocaar. I am also trying to solve many issues and starting from this (authentication problem),which exists.
Edited:
I finally solved the problem with invalid signature, and using as secret key: “openssl rand -base64 32” (the same as in loraserver and lora-app-server).
Then in the top-right JWT Field in localhost: 8080/Api/ i used the same secret key “openssl rand -base64 32” but i had the same issue:
Regards,
Nikos.
Can anyone help me?
I have been stuck here for a while.
Where ?
/api/devices/{dev_eui}/frames
after addition of device_eui im left with the below result
{
“error”: {
“grpcCode”: 16,
“httpCode”: 401,
“message”: “authentication failed: get token from context error: no authorization-data in metadata”,
“httpStatus”: “Unauthorized”,
“details”: []
}
}
from the forum I got to know that it was due to jwt key so followed instruction
[/api/internal/login]
{
“iss”: “lora-app-server”,
“aud”: “lora-app-server”,
“nbf”: 1489566958,
“exp”: 1489653358,
“sub”: “user”,
“username”: “admin”,
“password”: “admin”
}
which generates:
{
“jwt”: “ZZZZZZZZZZZZZZZZNiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJsb3JhLWFwcC1zZXJ2ZXIiLCJleHAiOjE1Mzc5NzA4NDUsImlzcyI6ImxvcmEtYXBwLXNlcnZlciIsIm5iZiI6MTUzNzg4NDQ0NSwic3ViIjoidXNlciIsInVzZXJuYW1lIjoiYWRtaW4ifQ.N4hyZGsFgVMjNJsXmXPIr6oNp0iZZZZZZZZZZZZZZZZ”
}
So this is to be used at JWT token on the top of thus page.?
and Im left with this…
Here^^
Thanks in advance
Hello,
try with firefox browser.
https://forum.loraserver.io/t/fetching-resource-list-undefined-please-wait/1830/4
hey can you please give the new link?