paulhitz / DnB-REST-Client

Custom REST Client for D&B (Dun & Bradstreet) services.
https://github.com/paulhitz/DnB-REST-Client
MIT License
5 stars 5 forks source link

Cached Authentication Token times out #18

Closed paulhitz closed 9 years ago

paulhitz commented 9 years ago

Minor defect...

Currently the tool caches Authentication Tokens per environment. This is a good thing. It allows quicker requests and reduces the impact of Authentication Service availability issues.

However, Authentication tokens time out after approx 8 hours which will result in Authentication errors if the tool has been running for longer than that.

There's an easy workaround. Just refresh the tool. This will clear the cache and the tool will request a new Token.

However, this should happen automatically. Perhaps add a timestamp when caching the token? And check this when checking to see if a token is cached.

paulhitz commented 9 years ago

The caching also means a user can't change the credentials used for authentication. Unless they clear the cache by refreshing the page.

paulhitz commented 9 years ago

Fixed in 1.1.7. The cached auth token is only valid for 8 hours.

Additionally, if you change the username or password, the cached token isn't used.