1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-01-10 04:17:59 +02:00
Commit Graph

42 Commits

Author SHA1 Message Date
Aaron L
ce2d3dac09 Make "remember" value passing unobtrusive
- Remove RM context key for Values.
- Add values types and code to be able to pull the remember me bool
  checkbox from the user.
2018-03-07 15:17:22 -08:00
Aaron L
ac3d2846f8 Rewrite the remember module
- Add context keys and storage pieces for remember
2018-03-07 15:13:06 -08:00
Aaron L
0eff53792f Fully re-implement recover
- Add back the feature to log in after password recovery
- Add new storer functionality to mocks
- Add RecoveringServerStorer
- Add RecoverableUser
- Add RecoverStartValuer, RecoverMiddleValuer, RecoverEndValuer
- Change storers to differentiate between tokens (recover vs confirm)
- Change BCryptCost to be a generic module configuration (doesn't belong
  to register)
2018-03-05 17:47:11 -08:00
Aaron L
9ef2a06dcb Rewrite the lock module
- Add lock module pieces to those that needed it (mocks/user)
2018-02-27 21:20:55 -08:00
Aaron L
982025bbc3 Finish implementing and testing confirm
- Rejig tests to remember to test the smtp mailer
2018-02-27 07:14:30 -08:00
Aaron L
dcd439e45a Adjust mocks and code to fit new register
- Document various gotchas about Preserve fields.
- Move configuration around to the proper modules.
2018-02-25 15:20:57 -08:00
Aaron L
d4f8d2f292 Finish auth module 2018-02-20 08:58:59 -08:00
Aaron L
c89ca29827 Remove context and errors from get/set
I have a feeling that I wrote all this fanciness in when the
user was still able to fetch himself from the database. But since
that's been dropped I don't think any of this stuff is necessary.

In terms of setting without an error, we should do validation before
an attempt to save, not every time we set a field. This will just end
up being much nicer error handling, and the database is going to do
it's own validation and we can handle that error in the same way.
2018-02-16 11:27:22 -08:00
Aaron L
23e1e849d3 Move expiry module
- Remove the errors from User interfaces
2018-02-14 14:18:03 -08:00
Aaron L
386133a84b Add a way to read values and validate
In order to support multiple different types of requests, there needed
to be an interface to be able to read values from a request, and
subsequently validate them to return any errors.

So we've adjusted the Validator interface to no longer validate a
request but instead validate the object it lives on.

And we've created a new BodyReader interface.
2018-02-04 18:39:25 -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
59b2874bcd Move validation implementations to defaults
- Add more interfaces for validation
2018-01-29 16:24:42 -08:00
Aaron L
2b5c85ee16 Import path fixes 2017-07-30 19:42:05 -07: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
0c3d6d26ca Remove gopkg.in 2016-12-19 22:47:12 -08:00
Aaron L
e76838cc1e Fix go vet errors 2016-05-08 12:37:02 -07:00
Aaron L
b8a8d772f7 recover: Context+Request separation ripple
- Modify the request mock to create query strings in the event that
  we're not using a POST request.
2015-08-02 12:54:53 -07:00
Aaron L
8a87d0de63 Separate the request from context. 2015-08-02 11:51:35 -07:00
Aaron
c98ef93e06 Fix modules after refactor. 2015-04-01 13:08:08 -07:00
Aaron
9ff0b65629 Rewrite module loading to be per-instance 2015-03-31 15:08:43 -07:00
Aaron L
99d0af8b72 Destroy a list of go lint errors. 2015-03-16 14:42:45 -07:00
Aaron
d7e63bc876 Remove silly key return from RememberStorer 2015-03-15 15:00:37 -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
082caf88b3 Clean up OAuth and finish tests.
- Fix #25
2015-03-13 02:15:58 -07: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
e6d3558704 Fix confirm email templates. 2015-02-25 23:39:55 -08:00
Kris Runzer
0928720a3f Add new auth testing and tempaltes 2015-02-24 15:02:11 -08:00
Aaron
bab0da8575 Fix lock module. 2015-02-22 12:43:28 -08:00
Kris Runzer
80e40e7817 Add RenderEmail to internal/render 2015-02-21 11:22:56 -08:00
Aaron
5f96e8dec8 Make an GetErr version of the ClientStorer. 2015-02-20 22:02:55 -08:00
Aaron
dee6a42a68 Finish tests for confirm.
- Rename UserXXX to StoreXXX in confirm/authboss.
2015-02-16 13:27:29 -08:00
Kris Runzer
d0dd19689b Fix confirm module to use global config 2015-02-15 20:35:32 -08:00
Aaron
a91a7ef162 Finish confirm module (except tests). 2015-02-15 20:21:38 -08:00
Kris Runzer
1aa0da808c Move duplicate testing mocks to internal/mocks
- Add force err ability to internal/mocks
2015-02-11 16:38:09 -08:00
Kris Runzer
dbf726b1e1 Finish recover module reworking 2015-02-10 23:03:02 -08:00
Kris Runzer
57c9282cbd First part of recover module reworking 2015-02-08 23:12:29 -08:00
Kris Runzer
c52f90b0a9 WIP commit 2015-02-05 10:31:32 -08:00
Aaron
f0552cd8c6 Add lock tests.
- Fix some logic errors in lock module.
- Add some more power to the mocks.
2015-01-24 22:19:22 -08:00
Aaron
8f6f322c63 Add new internal mocks.
- Update remember to use new mocks.
2015-01-23 16:24:34 -08:00