Skip to content

v1.3.0 — Customer accounts

Choose a tag to compare

@pwfauth pwfauth released this 12 Oct 00:39
· 4 commits to main since this release

Customer accounts for the native C++ client.

New

PwfClient can now work with customer accounts (a username and a password instead of a licence key), like the .NET package:

  • RegisterAccount(username, password, email): create an account.
  • RegisterAccountWithKey(username, password, licenseKey, email): create an account that takes a key's time and device limit (the key is used up).
  • AccountLogin(username, password): sign the account in on this PC. Call StartHeartbeat() afterwards, exactly as after Login: the kill switch works the same way.
  • ChangeAccountPassword(username, currentPassword, newPassword): change the password (every session of the account is signed out).
  • RedeemKey(username, password, licenseKey) and RedeemKey(licenseKey): add a key's time to an account, with its password or through the signed-in session.

Every reply is still checked against the server's signature. The README has a short example.

Upgrade

Replace PwfClient.h and PwfClient.cpp in your project and rebuild. ServerPublicKey.h and ProductionPolicy.h are unchanged from 1.2.0. Turn on Customer accounts for your app in the panel (Applications → edit the app → Rules).

This is a source release: build your own executable with your app secret. The package contains the public verification key only.

Validation

Release x64 build with no warnings at /W4. Every new function was run against the server: account creation (and a taken username refused), creation with a key (the key then refuses a plain key sign-in), account sign-in, heartbeat, adding a key through the session, sign-out, a wrong password refused, a password change and a sign-in with the new password.