1
0
mirror of https://github.com/volatiletech/authboss.git synced 2024-11-28 08:58:38 +02:00
Commit Graph

36 Commits

Author SHA1 Message Date
Aaron L
24fc6196c7 Introduce new type of client storage
- This addresses the problem of having to update multiple times during
  one request. It's hard to have a nice interface especially with JWT
  because you always end up having to decode the request, encode new
  response, write header, then a second write to it comes, and where do
  you grab the value from? Often you don't have access to the response
  as a "read" structure. So we store it as events instead, and play
  those events against the original data right before the response is
  written to set the headers.
2017-02-24 16:45:47 -08:00
Aaron L
fa6ba517db More gigantic edits.
- Change response to be more central to Authboss. Make sure it has
  useful methods and works with the new rendering idioms.
- Change the load user methods to all work with context keys, and even
  be able to set context keys on the current request to avoid setting
  contexts everywhere in the code base.
2017-02-23 16:13:25 -08:00
Aaron L
f65d9f6bb6 Fix errors package
- Fix many compilation errors
2017-02-21 15:04:30 -08:00
Aaron L
b9e2a62802 More changes 2017-02-20 16:08:19 -08:00
Aaron L
02e91bc0ad More changes 2017-02-20 15:56:26 -08:00
Aaron L
f7db80e4e2 Prototyping 2017-02-20 14:28:38 -08:00
Ryan Lester
588c21260c final App-Engine-related fixes 2016-05-07 02:12:20 -04:00
Ryan Lester
8b0f669869 more -Maker properties on Config 2016-05-03 21:14:24 -04:00
Aaron L
8a87d0de63 Separate the request from context. 2015-08-02 11:51:35 -07:00
Aaron
5119d414c1 Make bind/unbind a lot more generic.
- This allows for the user struct to contain just about anything. But it
  will still produce errors when there is a type mismatch (which I believe
  was the entire point of the type-specific code).
- Leave sql.Scanner/driver.Valuer as special cases to allow control over
  serialization at some level.
- Fix #69
2015-08-02 09:31:21 -07:00
Kris Runzer
9ee7c61bda Fix registration to bubble duplucate primaryID errors. Fix custom fields from disappearing on error renders. 2015-04-10 14:06:22 -07:00
Aaron L
99d0af8b72 Destroy a list of go lint errors. 2015-03-16 14:42:45 -07:00
Aaron
0754b965b1 Update config documentation.
- Fix #47: Remove ModuleAttrMeta from Storers. Rename to ModuleAttributes.
- Add some additional deafult values to config.
2015-03-15 08:31:48 -07:00
Aaron L
06edd2e615 Make OAuth2 implementation less shoddy.
- Add a new storer specifically for OAuth2 to enable clients to choose
  regular database storing OR Oauth2 but not have to have both.
- Stop storing OAuth2 credentials in a combined form inside username.
- Add new events to capture OAuth events just like auth.
- Have pass-through parameters for OAuth init urls, this allows us to
  pass additional behavior options (redirects and remember me) as well
  as other things that should be present on the page that is redirected
  to.
- Context.LoadUser is now OAuth aware.
- Remember's callbacks now include an OAuth check to see if a horribly
  packed state variable contains a flag to say that we want to be
  remembered.
- Change the OAuth2 Callback to use Attributes instead of that custom
  struct to allow people to append whatever attributes they want into
  the user that will be saved.
2015-03-13 16:29:58 -07:00
Aaron
538adcf188 Add initial oauth2 support.
- Needs more providers and more tests.
2015-03-12 19:20:36 -07:00
Kris Runzer
40154b2749 Update binding/unbinding to support Null* values with SQL drivers
- Changed to int64 across the board
2015-03-03 23:18:24 -08:00
Kris Runzer
a7a67981ce Move create from Storer to RegisterStorer
- Fixed the qq tests
- Removed all module singletons
2015-03-01 20:00:19 -08:00
Aaron
b93e0e6eb1 Add callback from confirm to BeforeAuth
- Allow missing struct attributes to go unnoticed in Bind()
2015-02-26 12:15:33 -08:00
Aaron
e369d626a8 Increase test coverage in authboss. 2015-02-24 13:03:06 -08:00
Aaron
c723f46a3e Refactor storers into modules. 2015-02-24 11:04:27 -08:00
Aaron
001810bf7c Add PrimaryID to the system.
- Fix #17
2015-02-22 13:24:53 -08:00
Aaron
585f842a5c Get authboss tests passing. 2015-02-20 04:03:22 -08:00
Aaron
6a4feaa2ea Add authboss error types.
- Add error handling at the routing level so that all errors can bubble
  up and be handled and logged there in one place.
- Add Err variants for ClientStorer and Attributes to facilitate
  generating errors for missing type-failing arguments.
- Add better control flow and error handling for callbacks.
2015-02-19 14:46:38 -08:00
Aaron
dee6a42a68 Finish tests for confirm.
- Rename UserXXX to StoreXXX in confirm/authboss.
2015-02-16 13:27:29 -08:00
Aaron
a91a7ef162 Finish confirm module (except tests). 2015-02-15 20:21:38 -08:00
Aaron
d86fac49ac Add confirm module beginnings.
- Fix some inconsistencies in expire and lock.
- Add bool type to storer.
2015-02-07 04:27:12 -08:00
Kris Runzer
2b043b78fa More work on cleaning up recover
- Add email layouts
2015-02-01 14:17:18 -08:00
Kris Runzer
e660edd428 Safety commit
- Add new validation methods
- Cleaned up interactions with validation
- Add required validation
- Add confirm fields to validation
2015-01-25 23:02:43 -08:00
Aaron
f537664fd9 Cleanup various sad things.
- Export ModuleAttrMeta so the modules can access it.
- Add a couple new events for later use.
- Fix a few compile errors.
- Prefix err constants with Err.
2015-01-23 15:56:24 -08:00
Aaron
efc834006a Add proper database/go casing. 2015-01-18 14:35:51 -08:00
Aaron
d9bcf5326c Lowercase all identifiers used with storer. 2015-01-14 17:48:14 -08:00
Aaron
f51bce96c9 Just store the type itself. Go has reflection. 2015-01-14 16:07:15 -08:00
Aaron
7f9fe3ec77 Add session and cookie concepts.
- Add tests for callbacks.
- Refactor callbacks into a keyed map.
2015-01-12 23:46:52 -08:00
Aaron
a2ffe4f7c4 Add many new files and types.
- Add context.
- Add handler type.
- Add new storers for client storage and sessions.
- Add start of remember module.
2015-01-10 22:54:31 -08:00
Aaron
11a0cabe5f Add unbind to pull data from a struct. 2015-01-07 11:39:12 -08:00
Aaron L
8ac986b99b Add some more infrastructure.
- Add module system.
- Add storer interface.
2015-01-03 12:03:57 -08:00