On Thu, Mar 14, 2019 at 9:13 PM sciUser <shulb...@securitycentric.net>
wrote:

> So here is what I get when trying to post to the /api/tokens
>
>  curl -X POST -F 'username=secretusername' -F 'password=secretpassword'
> http://localhost:8080/labview/api/tokens
> {"message":"Invalid login","translatableMessage":{"key":"Invalid
>
> login","variables":null},"statusCode":null,"expected":[{"name":"username","type":"USERNAME"},{"name":"password","type":"PASSWORD"}],"type":"INVALID_CREDENTIALS"}
>
>
Yeah apparently my guess wasn't quite so functional without some testing -
go figure.  Here's what I got to work:

# curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d
'username=guacuser&password=guacpass'
https://example.com/guacamole/api/tokens
{"authToken":"6C1A3A80FBD40C586D3A2ABAC9A74B5486B5D34AFB12BDCD39F5E4520BA1EB22","username":"guacuser","dataSource":"postgresql","availableDataSources":["postgresql","postgresql-shared"]}
# curl -X DELETE
https://example.com/guacamole/api/tokens/6C1A3A80FBD40C586D3A2ABAC9A74B5486B5D34AFB12BDCD39F5E4520BA1EB22

-Nick

Reply via email to