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

75 Commits

Author SHA1 Message Date
Aaron L
ee4b2658d5 Finish TODOs 2018-03-09 13:11:08 -08:00
Aaron L
1112987bce Rewrite oauth module
- Tried to be clear about OAuth2 vs OAuth in all places.
- Allow users to be locked from OAuth logins (if done manually for some
  reason other than failed logins)
- Cleaned up some docs and wording around the previously very confusing
  (now hopefully only somewhat confusing) oauth2 module.
2018-03-08 18:39:51 -08:00
Aaron L
634892e29c Fix breakages from last commit 2018-03-07 16:41:58 -08:00
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
7119b3a90e Delete now-unused code
- This may come back in a separated default Renderer of some kind.
2018-02-02 15:41:43 -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
Ryan Lester
8655934e60 run gofmt 2016-02-23 21:28:43 -08:00
Kris Runzer
b519034670 Add query param to Register to allow for setting of primaryID
- Usefull when linking user to register page from email and you don't want
  them to change their email
2015-10-28 14:20:22 -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
fb5c7ca377 internal/response: Context-Request separation 2015-08-02 12:00:53 -07:00
Aaron L
8a87d0de63 Separate the request from context. 2015-08-02 11:51:35 -07:00
Kris Runzer
f928282dec Remove password repopulation on recover complete. 2015-04-21 08:12:41 -07:00
Kris Runzer
24b9501709 Add 'showRegister' flag to auth module. 2015-04-10 12:04:26 -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
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
Kris Runzer
5bdcddd9da Rename internal/render to internal/response 2015-03-28 09:08:05 -07:00
Kris Runzer
db1eb3a9a8 Add redir override. All redirects now occur through render.Redirect 2015-03-28 08:53:32 -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
Kris Runzer
2b6954709d Add simple context to default emails 2015-03-08 17:40:59 -07:00
Kris Runzer
7ff35efe54 Split emails to have seperate HTML and Text layouts. 2015-03-03 11:23:49 -08:00
Kris Runzer
c8e2058440 Fix flash message clearing
- Fix token emailing bug with confirm (l2base64)
2015-02-26 22:01:53 -08:00
Kris Runzer
bfa4c38da5 Fix template name and bin data 2015-02-26 20:47:33 -08:00
Kris Runzer
57797a703b Proper naming of all templates. Rebuild bindata. 2015-02-26 12:52:45 -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
e6d3558704 Fix confirm email templates. 2015-02-25 23:39:55 -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
8b1007f7dd Fix broken redirect tests. 2015-02-24 23:45:55 -08:00
Kris Runzer
0928720a3f Add new auth testing and tempaltes 2015-02-24 15:02:11 -08:00
Aaron
f716720759 Fix broken render test. 2015-02-24 14:52:22 -08:00