IMPORTANT!
This forum is now archived. Click here for the New Support Forum
Unable to get information via several api's
Quote from adir on August 19, 2020, 7:03 amHi.
i'm using the quickapp template and some of the api's are not available. under the hood, if i'm using swagger, i can see that i got a message for "wrong token", but my token works great in other services and i'm logged in as admin. (im using the main template without any changes yet) this cause several pages in the demo app to get empty and stuck on loading.
Thanks in advance.
examples:
api/Account/users/me
Bearer error="invalid_token"
Hi.
i'm using the quickapp template and some of the api's are not available. under the hood, if i'm using swagger, i can see that i got a message for "wrong token", but my token works great in other services and i'm logged in as admin. (im using the main template without any changes yet) this cause several pages in the demo app to get empty and stuck on loading.
Thanks in advance.
examples:
api/Account/users/me
Bearer error="invalid_token"
Quote from Dave Arnoldi on August 19, 2020, 7:38 amIt's not clear from your question, but did you login in swagger, or in the angular frontend?
Not all API endpoints are restricted, so it is possible that you will get a valid response from some endpoints in swagger even with an invalid or no token.
It's not clear from your question, but did you login in swagger, or in the angular frontend?
Not all API endpoints are restricted, so it is possible that you will get a valid response from some endpoints in swagger even with an invalid or no token.
Quote from adir on August 19, 2020, 8:27 amHi dave
i'm able to login from both swagger & client side. (i took the code from github without changes)
when i'm trying to GET/POST to an authorize api with the token i've got i get an "401 Unauthorized" from my api. again, i'm working with the updated code from github.
more examples:
- authorize is success from swagger
- trying to execute /api/Account/users/me from swagger
- getting and error : "www-authenticate: Bearer error="invalid_token"
- see attached files
Hi dave
i'm able to login from both swagger & client side. (i took the code from github without changes)
when i'm trying to GET/POST to an authorize api with the token i've got i get an "401 Unauthorized" from my api. again, i'm working with the updated code from github.
more examples:
- authorize is success from swagger
- trying to execute /api/Account/users/me from swagger
- getting and error : "www-authenticate: Bearer error="invalid_token"
- see attached files
Quote from Dave Arnoldi on August 19, 2020, 8:39 amIn the swagger UI, just above the section you pasted, there is a box labeled 'Curl'.
The first line should read:
curl -X GET "https://localhost:44350/api/Account/users/me" -H "accept: text/plain" -H "Authorization: Bearer
After that, there should be a number of lines of ASCII characters.
Please copy and paste all of that here and I will take a look for you.
In the swagger UI, just above the section you pasted, there is a box labeled 'Curl'.
The first line should read:
curl -X GET "https://localhost:44350/api/Account/users/me" -H "accept: text/plain" -H "Authorization: Bearer
After that, there should be a number of lines of ASCII characters.
Please copy and paste all of that here and I will take a look for you.
Quote from adir on August 19, 2020, 10:13 amThis is the curl
i upload it to web app on azure:
curl -X GET "https://biocomsandbox.azurewebsites.net/api/Account/users/me" -H "accept: text/plain" -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IlE4LURrTDhUYTBTRVFxWmtra2xSUVEiLCJ0eXAiOiJhdCtqd3QifQ.eyJuYmYiOjE1OTc4MzE4MTQsImV4cCI6MTU5NzgzNTQxNCwiaXNzIjoiaHR0cHM6Ly9iaW9jb21zYW5kYm94LmF6dXJld2Vic2l0ZXMubmV0IiwiYXVkIjoiYmlvY29tX2FwaSIsImNsaWVudF9pZCI6InN3YWdnZXJ1aSIsInN1YiI6Ijc0NmViODQ1LTQwYzItNDU0Zi04YjNjLWQwZmY1OWY0NDZjMiIsImF1dGhfdGltZSI6MTU5NzgzMTgxMywiaWRwIjoibG9jYWwiLCJyb2xlIjoiYWRtaW5pc3RyYXRvciIsInBlcm1pc3Npb24iOlsidXNlcnMudmlldyIsInVzZXJzLm1hbmFnZSIsInJvbGVzLnZpZXciLCJyb2xlcy5tYW5hZ2UiLCJyb2xlcy5hc3NpZ24iXSwibmFtZSI6ImFkbWluIiwiZW1haWwiOiJhZG1pbkBiaW9jb20uY29tIiwicGhvbmVfbnVtYmVyIjoiKzEgKDEyMykgMDAwLTAwMDAiLCJmdWxsbmFtZSI6IkluYnVpbHQgQWRtaW5pc3RyYXRvciIsInNjb3BlIjpbImJpb2NvbV9hcGkiXSwiYW1yIjpbInB3ZCJdfQ.nxEBC3nEZYLcTBSg1vFm70cyw-SBs-C8OqBTulHRb0A5rPqlvaluzk7lyxl5wWNh04TMxUxYUOVDwQTHJNlKsXbeUhN3CpH9UhR36CnnYZxRwA0Lr-hs35ocNinem_7oE4L7Xoqm8Q9EK1vAJMVdEbfX2Ps9R85VU7DfgyWNU6l7sn0p6b0Tkhr-7aX90SrRbEmrY0zZZsMiL0Zn3u5VicU76RvtsqCAaIWtL2imYm-hxNkSxR0_pQdqKUmEoSafTm2Zyq9DopxWmu_kt4xy01F4joIlU-tqlaKSHNjFjcYYu1WwACW3yJAjFUMy-DZUAF6U2g2Um6TfijbEXbXi5g"
This is the curl
i upload it to web app on azure:
curl -X GET "https://biocomsandbox.azurewebsites.net/api/Account/users/me" -H "accept: text/plain" -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IlE4LURrTDhUYTBTRVFxWmtra2xSUVEiLCJ0eXAiOiJhdCtqd3QifQ.eyJuYmYiOjE1OTc4MzE4MTQsImV4cCI6MTU5NzgzNTQxNCwiaXNzIjoiaHR0cHM6Ly9iaW9jb21zYW5kYm94LmF6dXJld2Vic2l0ZXMubmV0IiwiYXVkIjoiYmlvY29tX2FwaSIsImNsaWVudF9pZCI6InN3YWdnZXJ1aSIsInN1YiI6Ijc0NmViODQ1LTQwYzItNDU0Zi04YjNjLWQwZmY1OWY0NDZjMiIsImF1dGhfdGltZSI6MTU5NzgzMTgxMywiaWRwIjoibG9jYWwiLCJyb2xlIjoiYWRtaW5pc3RyYXRvciIsInBlcm1pc3Npb24iOlsidXNlcnMudmlldyIsInVzZXJzLm1hbmFnZSIsInJvbGVzLnZpZXciLCJyb2xlcy5tYW5hZ2UiLCJyb2xlcy5hc3NpZ24iXSwibmFtZSI6ImFkbWluIiwiZW1haWwiOiJhZG1pbkBiaW9jb20uY29tIiwicGhvbmVfbnVtYmVyIjoiKzEgKDEyMykgMDAwLTAwMDAiLCJmdWxsbmFtZSI6IkluYnVpbHQgQWRtaW5pc3RyYXRvciIsInNjb3BlIjpbImJpb2NvbV9hcGkiXSwiYW1yIjpbInB3ZCJdfQ.nxEBC3nEZYLcTBSg1vFm70cyw-SBs-C8OqBTulHRb0A5rPqlvaluzk7lyxl5wWNh04TMxUxYUOVDwQTHJNlKsXbeUhN3CpH9UhR36CnnYZxRwA0Lr-hs35ocNinem_7oE4L7Xoqm8Q9EK1vAJMVdEbfX2Ps9R85VU7DfgyWNU6l7sn0p6b0Tkhr-7aX90SrRbEmrY0zZZsMiL0Zn3u5VicU76RvtsqCAaIWtL2imYm-hxNkSxR0_pQdqKUmEoSafTm2Zyq9DopxWmu_kt4xy01F4joIlU-tqlaKSHNjFjcYYu1WwACW3yJAjFUMy-DZUAF6U2g2Um6TfijbEXbXi5g"
Quote from adir on August 19, 2020, 10:15 amon local host (client side), i get
invalid issuer in discovery document expected: https://localhost:44350/ current: https://localhost:44350
Severity: "error", Summary: "Unable to login", Detail: "discovery_document_validation_error", Error: ""discovery_document_validation_error""
on local host (client side), i get
invalid issuer in discovery document expected: https://localhost:44350/ current: https://localhost:44350
Severity: "error", Summary: "Unable to login", Detail: "discovery_document_validation_error", Error: ""discovery_document_validation_error""
Quote from Dave Arnoldi on August 19, 2020, 10:34 amOk I see your issue, unfortunately my azure knowledge is limited.
Try set the identity server authority explicitly in the config if it is not already.
Ok I see your issue, unfortunately my azure knowledge is limited.
Try set the identity server authority explicitly in the config if it is not already.
Quote from Dave Arnoldi on August 19, 2020, 10:36 amIn other words set authority url to biocomsandbox.azurewebsites.net instead of localhost, and make sure of the port that the API is actually running on.
In other words set authority url to biocomsandbox.azurewebsites.net instead of localhost, and make sure of the port that the API is actually running on.
IMPORTANT!
This forum is now archived. Click here for the New Support Forum