1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-01-26 05:27:33 +02:00

60 Commits

Author SHA1 Message Date
Aaron L
cf05c8d36b Work on logging and error handling some more 2018-02-02 15:41:24 -08:00
Aaron L
27010d9fe4 Abstract logger and error handling
- Replace the old logging mechanisms with a leveled one. This is
  important as authboss needs to start saying a lot more about what's
  happening in the Info log, which will end up like Debug but that's
  okay.
- Replace the error handling mechanisms with something different. This
  allows people to define their own error handlers.
2018-02-02 12:11:47 -08:00
Aaron L
22e99a9921 Work on the auth module
- Move more *User interfaces into storage.go, no need for them to be in
  each individual module.
2018-02-01 17:23:31 -08:00
Aaron L
de1c2ed081 Get tests working after latest refactors
- Change changelog format to use keepachangelog standard
- Refactor the config to be made of substructs to help organize all the
  pieces
- Add the new interfaces to the configuration
- Clean up module loading (no unnecessary reflection to create new value)
- Change User interface to have a Get/SetPID not E-mail/Username, this
  way we don't ever have to refer to one or the other, we just always
  assume pid. In the case of Confirm/Recover we'll have to make a GetEmail
  or there won't be a way for us to get the e-mail to send to.
- Delete the xsrf nonsense in the core
2018-02-01 15:42:48 -08:00
Aaron L
b33e47a97c Re(move) swaths of code
- Document more things
- Remove module code
- Remove callbacks code
- Remove data makers, flash messages, and context providers in exchange
  for middlewares that use context (unwritten)
- Move more implementations (responses, redirector, router) to defaults
  package
- Rename key interfaces (again), Storer -> User, StoreLoader ->
  ServerStorer (opposite of ClientStateStorer) if this is the last time
  I rename these I'll be shocked
2018-01-31 17:07:11 -08:00
Aaron L
0e9761ddf5 Start moving default implementations 2018-01-29 13:14:55 -08:00
Aaron L
c8457d818d Add ability to wrap responsewriters indefinitely 2018-01-29 11:35:47 -08:00
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
f65d9f6bb6 Fix errors package
- Fix many compilation errors
2017-02-21 15:04:30 -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
96c55ccaaa no DisableGoroutines (just check for -Maker); no ModuleNames; test fix 2016-05-09 13:20:10 -04: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
orian
231e4b2283 Fix a problem with not getting the correct Context when running on Google App Engine 2016-02-23 21:24:21 -08:00
Kris Runzer
7cb729827b Fix default validators to be inline with default primary ID 2015-06-04 13:34:29 -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
d6c0eb8684 Remove state from config, add to authboss type. 2015-03-31 12:36:40 -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
bd0d3c5f68 Add a default logger.
- Having the default logger set to nil was troublesome because some errors
  are hard to detect without a logger. This falls under "sane default"
  changes and so should be made.
2015-03-30 09:55:37 -07:00
Aaron L
99d0af8b72 Destroy a list of go lint errors. 2015-03-16 14:42:45 -07:00
Aaron
4651176f4d Add more config docs. 2015-03-15 11:25:01 -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
Aaron
dccabb0754 Rename HostName to RootURL 2015-03-12 19:20:28 -07:00
Kris Runzer
7ff35efe54 Split emails to have seperate HTML and Text layouts. 2015-03-03 11:23:49 -08:00
Kris Runzer
8901ad4ed7 WIP fixing expiry 2015-03-02 08:04:31 -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
Kris Runzer
c8e2058440 Fix flash message clearing
- Fix token emailing bug with confirm (l2base64)
2015-02-26 22:01:53 -08:00
Aaron
fa3cd5ef4f Fix confirm fields. 2015-02-25 23:20:02 -08:00
Aaron
bf0a8b098c Add mountedpath so forms work on mounted paths.
- Refactor naming for config "redirect" variables.
- Removed flash messages from config, Fix #19
2015-02-25 23:05:14 -08:00
Aaron
1075149bb8 Add router tests.
- Rename Endpoint to Location in ErrAndRedirect
2015-02-24 14:45:37 -08:00
Kris Runzer
199d0ec0b3 Rework recover 2015-02-23 16:01:56 -08:00
Aaron
6f074543f4 Start the register module. 2015-02-23 02:03:29 -08:00
Aaron
001810bf7c Add PrimaryID to the system.
- Fix #17
2015-02-22 13:24:53 -08:00
Kris Runzer
1198466d76 Reworking auth 2015-02-21 11:22:55 -08:00
Kris Runzer
06c5e686a1 Merge internal/views into internal/render
- Remove internal/view
- Remove internal/flashutil
2015-02-20 14:21:24 -08:00
Kris Runzer
bab1475b72 Change config to be global. Updated most modules and tests. 2015-02-15 20:07:36 -08:00
Kris Runzer
57c9282cbd First part of recover module reworking 2015-02-08 23:12:29 -08:00
Aaron
8a9736f664 Add ViewData concepts for layout files. 2015-02-01 15:51:01 -08:00
Kris Runzer
2b043b78fa More work on cleaning up recover
- Add email layouts
2015-02-01 14:17:18 -08:00
Kris Runzer
4b1ce859fb Reworking recover module 2015-01-31 22:51:00 -08:00
Aaron L
c1670a041f Add form value name for xsrf tokens. 2015-01-27 17:34:55 -08:00
Aaron
b3042339d0 Add XSRF support. 2015-01-27 02:11:19 -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
042bdba669 First shot at the expire module. 2015-01-25 18:13:32 -08:00
Aaron
8ceeec5420 Fixed up e-mailing.
- Fix #13
2015-01-25 15:40:57 -08:00
Aaron
fe7b990095 Add beginnings of lock package.
- Adjust configuration for some lock variables and better XML Names.
2015-01-23 16:25:12 -08:00
Kris Runzer
934ddf5531 Move all html to internal packge views 2015-01-18 14:24:20 -08:00