From 2eff32e3c86aa1b7784dbbb959c9430daa1161b3 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 2 Aug 2015 10:05:31 -0700 Subject: [PATCH] Update documentation. --- CHANGELOG.md | 9 +++++++++ README.md | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e8c4dc..a48b648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Changelog ========= +## 2015-08-02 Change the way Bind/Unbind works +This change is potentially breaking, it did break the sample since the supporting struct was wrong for the data we were using. + +**Lock:** The documentation was updated to reflect that the struct value for AttemptNumber is indeed an int64. +**Unbind:** Previously it would scrape the struct for the supported types (string, int, bool, time.Time, sql.Scanner/driver.Valuer) +and make them into a map. Now the field list will contain all types found in the struct. +**Bind:** Before this would only set the supported types (described above), now it attempts to set all values. It does check to ensure +the type in the attribute map matches what's in the struct before assignment. + ## 2015-04-01 Refactor for Multi-tenancy This breaking change allows multiple sites running off the same code base to each use different configurations of Authboss. To migrate your code simply use authboss.New() to get an instance of Authboss and all the old things that used to be in the authboss package are diff --git a/README.md b/README.md index d9c86bb..915e585 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,7 @@ to pages with sensitive information if this value is true in the session, and fo - [Storer](#storers) **Storage Requirements:** -- AttemptNumber (int) +- AttemptNumber (int64) - AttemptTime (time.Time) - Locked (time.Time) @@ -382,8 +382,7 @@ naming control (yet). Oauth2Uid in the struct -> "oauth2_uid" in the attributes struct should be returned from storer methods as a pointer. **Fields:** Each module in authboss has storage requirements. These are listed in the documentation but also at runtime authboss.ModuleAttributes is -available to list out each required field. The fields must be named appropriately and of the correct type. There are 5 types available: int64, string, bool, time.Time -and anything that implements database/sql.Scanner and database/sql/driver.Valuer standard library interfaces. +available to list out each required field. The fields must be named appropriately and of the correct type. **Choose a PrimaryID:** Email or Username can be selected for a primary id for the user (default email). This must be a unique field in the data store and must be set to the Authboss configuration's PrimaryID, you can use authboss.StoreEmail and authboss.StoreUsername constants