cloudant / nodejs-cloudant

Cloudant Node.js client library
Apache License 2.0
255 stars 90 forks source link

Cookie token manager #397

Closed smithsz closed 5 years ago

smithsz commented 5 years ago

Checklist

Description

Add CookieTokenManager class for managing cookie session renewals.

Approach

The cookie renewal logic has been centralised into a token manager class. Once implemented fully, the cookie authentication plugin will make .renew() requests against the token manager class. The token manager class is designed to avoid unnecessary renewals and operate without needing the lockfile dependancy (to be removed in a later PR).

Schema & API Changes

No change.

Security and Privacy

No change.

Testing

Includes additional unit tests. Existing cookie authentication tests will be used to test CookieTokenManager logic.

Monitoring and Logging

No change.