Uploaded image for project: 'SimplyE 2.0'
  1. SimplyE 2.0
  2. SIMPLY-4038

Designate an existing Credential as 'permanent', unable to be regenerated under normal use

XMLWordPrintable

      In setting up the testing environment for Open eBooks we've found it useful to have some test Credentials (from Firstbook and Clever) that never expire. On first glance it seems possible to get this by clearing out the expiration date for the Credential in the 'credentials' table. But this doesn't work, because initiating the login process again (as often happens at the beginning of tests) will wipe that credential and create a new one.

      Here's a strategy for solving this problem:

      • Add a column called 'permanent' to the 'credentials' table. There is no code or UX for setting this column; it must be set manually with a SQL command.
      • A Credential that's permanent will never be treated as expired. In fact you could clear out the expiration date in passing if you see one on a permanent Credential.
      • If you're ever about to modify the .credential of a permanent Credential, don't. Just leave it alone.

      To make a FirstBook OAuth credential ready for testing, we'd clear out its expiration date and 

            leonardrichardson Leonard Richardson [X] (Inactive)
            leonardrichardson Leonard Richardson [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: