Nebula83 / openhab2-addons

Add-ons for openHAB 2.x
Eclipse Public License 1.0
8 stars 2 forks source link

Api does login request for every call #4

Closed Nebula83 closed 7 years ago

Nebula83 commented 7 years ago

It should just reauthenticate when the access token expires and use the refresh token.

Nebula83 commented 7 years ago

Using refresh token

refresh_token={{refresh_token}}&Host=rs.alarmnet.com%2F&Pragma=no-cache&Cache-Control=no-store+no-cache&scope=EMEA-V1-Basic+EMEA-V1-Anonymous+EMEA-V1-Get-Current-User-Account&grant_type=refresh_token&Content-Type=application%2Fx-www-form-urlencoded%3B+charset%3Dutf-8&Connection=Keep-Alive

Basic auth: {{application_id}} test

Nebula83 commented 7 years ago

Timestamp code

    long time = System.currentTimeMillis();
Nebula83 commented 7 years ago

Fixed in 29fa6d8e2cdc9b5484059cac8118af31e86067fd