Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: extra characters on token #153

Open
cdupont opened this issue Apr 19, 2021 · 2 comments
Open

API: extra characters on token #153

cdupont opened this issue Apr 19, 2021 · 2 comments
Assignees
Labels

Comments

@cdupont
Copy link
Contributor

cdupont commented Apr 19, 2021

I try to extract a token:

curl -X POST http://wazigate.local/auth/token -H  "accept: application/json" -H  "Content-Type: application/json" -d "{\"username\":\"admin\",\"password\":\"loragateway\"}"
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJjbGllbnQiOiI2MDE3Yzc0Zjc4NDUyNDAwMDYwMzYwYTgiLCJleHAiOjE2MTg4NDYxNzF9.zuVdtcX8Ggw1ex8zGXizJBL7O2PH2mcQkwQJucN_oNM"

The string returned contains "" characters. I wonder if they should be here?

On WaziCloud API they are not there:

 curl -X POST "https://api.waziup.io/api/v2/auth/token" -H  "accept: text/plain;charset=utf-8" -H  "Content-Type: application/json;charset=utf-8" -d "{  \"username\": \"cdupont\",  \"password\": \"password\"}"
eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJMbGE5X3BNeFVwc1QxTXpsM2dsdkRFTFZIa256OWZDb191Q3JheDh1dkJ3In0.eyJqdGkiOiIyZDVlMTQ1Mi00ZGI5LTQyMjAtODFhNS1jOTRmNjk1MDFhM2QiLCJleHAiOjE2MTg4NDY1NTMsIm5iZiI6MCwiaWF0IjoxNjE4ODQ1OTUzLCJpc3MiOiJodHRwczovL2tleWNsb2FrLndheml1cC5pby9hdXRoL3JlYWxtcy93YXppdXAiLCJhdWQiOiJhcGktc2VydmVyIiwic3ViIjoiMmVjZmFlMjQtZjM0MC00YWQwLWExMmUtMDJjZGM2MGNkOGJhIiwidHlwIjoiQmVhcmVyIiwiYXpw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IVCBsVXhhsIV7lUCD4SmLWvD7iNAxhCEZlAmYap0a0tbAXPELp9CjZmWdCizWa1A7f_8BERqbyyV0-_uKW1BM2PV493503sMSA
@mojtaba-esk
Copy link
Contributor

it returns standard json

@cdupont
Copy link
Contributor Author

cdupont commented Apr 19, 2021

It seems that both WaziGate and WaziCloud token API are not up to standard actually...
From this website:
https://auth0.com/docs/api/authentication?http#get-token

image

The response is a JSON structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants