|
@@ -0,0 +1,45 @@
|
|
|
+# account-base package
|
|
|
+
|
|
|
+## Files documented
|
|
|
+
|
|
|
+* url_client.js
|
|
|
+* url_server.js
|
|
|
+
|
|
|
+## Classes
|
|
|
+
|
|
|
+### `AccountsClient`
|
|
|
+
|
|
|
+* `url_client.js` additions:
|
|
|
+ * `_attemptToMatchHash()` : Try to match the saved value of window.location.hash to one of the reserved hashes, to trigger an Accounts operation. On success, invokes passed handler which, when called from `_initUrlMatching()`, will always be `defaultSuccessHandler()`.
|
|
|
+ * `_initUrlMatching()`: called by constructor. Inits extra data on instance and invokes `_attemptToMatchHash()`
|
|
|
+ * `onResetPasswordLink()` Register a function to call when a reset password link is clicked in an email sent by on of the hash handlers. See [Accounts-onResetPasswordLink](http://localhost:3333/#Accounts-onResetPasswordLink)
|
|
|
+ * `onEmailVerificationLink()` Register a function to call when an email verification link is clicked in an email sent by a hash handler. See [Accounts-onEmailVerificationLink](http://localhost:3333/#Accounts-onEmailVerificationLink)
|
|
|
+ * `onEnrollmentLink()` Register a function to call when an account enrollment link is clicked in an email sent by a hash handler. See [Accounts-onEnrollmentLink](http://localhost:3333/#Accounts-onEnrollmentLink)
|
|
|
+ * Globals read
|
|
|
+ * `window.location.hash`. Reserved hashes:
|
|
|
+ * `reset-password`
|
|
|
+ * `verify-email`
|
|
|
+ * `enroll-account`
|
|
|
+ * `defaultSuccessHandler()`
|
|
|
+ * `attemptToMatchHash()`
|
|
|
+
|
|
|
+### `AccountsServer`
|
|
|
+
|
|
|
+* methods. These 3 methods are public but marked (in 1.2.1) as likely not to remain so
|
|
|
+ * `resetPassword()` : generates a password reset link (from token)
|
|
|
+ * `verifyEmail()`: generates an email verification link (from token)
|
|
|
+ * `enrollAccount()`: generates an account enrollment link (from token)
|
|
|
+
|
|
|
+### `AccountsTest`
|
|
|
+
|
|
|
+* methods
|
|
|
+ * `attemptToMatchHash()` facade for `attemptToMatchHash()` function
|
|
|
+ * Globals read
|
|
|
+ * `Accounts` (see `globals_server.js`)
|
|
|
+
|
|
|
+## Functions
|
|
|
+
|
|
|
+### `url_client.js`
|
|
|
+
|
|
|
+* `defaultSuccessHandler()` : suspends autologin, invokes other handles for the same hash, passing them a closure capable of enabling autologin.
|
|
|
+
|