1
0
mirror of https://github.com/volatiletech/authboss.git synced 2024-11-24 08:42:17 +02:00
Commit Graph

24 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
3170cb8068 Ensure we don't re-lookup, cache in context 2017-02-23 16:29:58 -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
02e91bc0ad More changes 2017-02-20 15:56:26 -08:00
Ryan Lester
588c21260c final App-Engine-related fixes 2016-05-07 02:12:20 -04:00
Aaron L
be041cbae6 remember: Context+Request separation ripple
- Re-add the age-old "Values" from the Context. This was originally
  there for exactly the documented purpose. However the Context holding
  the request form values negated it's use. It's back because of this
  new separation.
- Make the auth success path set the authboss.CookieRemember value in
  the context before calling it's callback.
2015-08-02 14:02:14 -07:00
Aaron L
8a87d0de63 Separate the request from context. 2015-08-02 11:51:35 -07:00
Aaron
f12f10fa43 Stop reliance on global scope.
- This change was necessary because multi-tenancy sites could not use
  authboss properly.
2015-03-31 12:34:03 -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
001810bf7c Add PrimaryID to the system.
- Fix #17
2015-02-22 13:24:53 -08:00
Aaron
5f96e8dec8 Make an GetErr version of the ClientStorer. 2015-02-20 22:02:55 -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
9f4cde2934 Clean up save/load user on context.
- Fix #16
2015-02-18 08:45:27 -08:00
Aaron
58e2f1f355 Add a method to pick attributes from a context. 2015-01-28 00:32:53 -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
1073b36cce Add SaveUser for context.
- Add test coverage for context.go
2015-01-16 21:30:04 -08:00
Kris Runzer
716e7dd6ba Add response writer to client storer 2015-01-15 14:01:01 -08:00
Aaron
0b66578b88 Add full-circle remember me test.
- Add more helpers to context.
2015-01-15 02:56:13 -08:00
Aaron
670c6f3b9f Add more to context.
- Add test coverage to various modules.
2015-01-14 19:18:45 -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