Zentitle SDK and Library
1152

Cached credentials need auth

If an Account Based License (ABL) is in force, and the library is exited without returning the license, the local license status becomes -70 (ABL cached credentials need validation). After restarting the library, an attempt to refresh the license or return the license will generate an -1152 error ("Cached credentials need auth").

Solution

To recover from this error, one can either

  1. Enter credentials into the library with a call to NSLSetCredentials(), then validate those credentials stored in the local license file with a call to NSLCheckCredentials(). After NSLCheckCredentials() successfully returns, the license status will return to its former, valid status and one can continue as usual.
  2. Call NSLReturnLicense(). This will return the license to Nalpeiron even if you don't know the credentials to validate the local license file.

In a pinch, the local license file can be deleted. This is not recommended as, depending on circumstances, an activation or unconsumed consumption tokens may be lost.

One can avoid this situation entirely by returning the license before shutting down the library. Also, even if the license is in a -70 state it can still be returned to the Nalpeiron server (NSLReturnLicense() or similar). In this case, if the license is returned with a -70 status, the server will still return a "seat" to the available checkout pool along with any outstanding features and elements. A forced return of this type may be used even if the end user forgets their credentials.

Error Codes