Skip to content

Instantly share code, notes, and snippets.

@robertmassaioli
Last active January 30, 2016 06:15
Show Gist options
  • Save robertmassaioli/a690f3bbf91615a992f7 to your computer and use it in GitHub Desktop.
Save robertmassaioli/a690f3bbf91615a992f7 to your computer and use it in GitHub Desktop.

Definitions

Field Description
CK Exists The new client key in the lifecle event already exists in the database
BURL Missing The new base url does not exist in the database
BURL Different The new base url does exist in the database but the new client key from the request is different to the one in the database
BURL Same The new base url does exist in the database and the client key from the request is the same as the one in the database

The "CK Exists" is a boolean and the BURL is a ternary.

Scenarios

CK BURL Reaction Safe?
False Missing This is the basic case, you have never seen this client key or base url before. Just accept the installation. Safe
False Different The client keys have changed for the same base url. DANGER! Fail installation. Dangerous
False Same Invalid state; indicative of major bug in your code or database. Investigate further. Client key could and could not be found at the same time in your database. Dangerous
True Missing The same client key exists in the database but the baseUrl is changing. DANGER! Base URL Redirect attempt. Fail installation. Dangerous
True Different The client keys have changed for the same base url. DANGER! Fail installation. Dangerous
True Same This is what a reinstall will look like. But there is no way to verify that this request is still the same host. Don't update data. Caution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment