1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-02-03 13:21:22 +02:00

Update documentation.

This commit is contained in:
Aaron 2015-08-02 10:05:31 -07:00
parent 4d1236b849
commit 2eff32e3c8
2 changed files with 11 additions and 3 deletions

View File

@ -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

View File

@ -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