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

28 Commits

Author SHA1 Message Date
frederikhors
827256e4d7 Redundant types in composite literals 2020-01-29 14:08:11 +01:00
Aaron L
6f3e7ca54a Add more flexibility to authboss.Middleware
- Add requirements and responses for the authboss middleware. This lets
  us later add new types that don't break the API instead of a list of
  bools.
2018-12-10 23:00:27 -08:00
Aaron L
5a62b6c20c Fix some broken tests 2018-10-28 23:28:04 -07:00
Aaron L
8249d714d0 Fix redirects using Middleware 2018-08-31 14:57:22 -07:00
Aaron L
6164dd8da4 Finish otp module 2018-07-17 15:25:25 -07:00
Aaron L
4aa961f758 Load and verify user logged in middleware 2018-04-30 18:17:07 -07:00
Aaron L
ee4b2658d5 Finish TODOs 2018-03-09 13:11:08 -08:00
Aaron L
ad5230a303 Bring back events
- Rename callbacks -> events
- Regenerate stringers.go with later version of stringer
2018-02-01 16:31:08 -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
cbfc1d8388 Fix authboss core tests
- Delete callbacks tests
- Remove some useless code (SendMail), as well as some extra arguments
  in certain functions that didn't require them.
- Remove tests for more code that has been moved to default
  implementations
2018-02-01 11:51:43 -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
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
b09e4831b6 Fix an issue where user is db fetched twice
- Fix #79
- Rename event EventGet to EventGetUser
- Remove double DB fetch
- Add new event callpoint: After(EventGetUser) for things that need to
  check that the user is ABLE to be gotten after it's fetched from the
  DB. That is before returning to the web app, ensure that the user is
  valid from a confirmation/lock etc point of view.
- Add test to make sure all the events are firing in CurrentUser()
2015-09-21 20:53:51 -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
e83110ee31 Add UpdatePassword.
- Fix #50
2015-03-16 22:58:32 -07:00
Kris Runzer
21c35ac1d5 Remember now properly regenerates tokens on use. 2015-03-01 20:40:09 -08:00
Aaron
1075149bb8 Add router tests.
- Rename Endpoint to Location in ErrAndRedirect
2015-02-24 14:45:37 -08:00
Kris Runzer
bab1475b72 Change config to be global. Updated most modules and tests. 2015-02-15 20:07:36 -08:00
Aaron
89875f7b68 Clean up mocks.
- Add CurrentUser method.
2015-01-17 02:42:42 -08:00
Kris Runzer
7841223f39 Made config global in authboss 2015-01-16 22:03:40 -08:00
Kris Runzer
a0bde30e3d Implement auth logout
- Add del to client storer interface
2015-01-15 16:04:33 -08:00
Kris Runzer
716e7dd6ba Add response writer to client storer 2015-01-15 14:01:01 -08:00
Aaron
443f482b71 Fixed auth and auth tests.
- Added more error checking to remember module.
2015-01-15 13:24:12 -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
Kris Runzer
41670f72ff Fixed auth to work with root changes 2015-01-09 22:51:02 -08:00
Aaron
92b3172a3e Add a lot of module related stuff.
- Leave a failing test to make hate not love.
2015-01-05 00:18:41 -08:00