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

47 Commits

Author SHA1 Message Date
guoguangwu
65c6e7bd74 chore: remove refs to deprecated io/ioutil 2023-11-16 10:15:46 +08:00
Aaron L
7939063139 Fix another open redirect issue 2021-05-18 00:18:27 -07:00
Robert Brennan
7d0371efdc
Update responder.go 2020-08-27 14:44:51 -04:00
Aaron L
3a5c333b5b Move to go modules 2020-07-03 11:24:07 -07:00
Aaron L
4d33b97b4f Merge branches
'frederikhors/patch-1'
'frederikhors/Redundant-type-conversion'
'frederikhors/Redundant-types-in-composite-literals'
'frederikhors/Imported-pkg-name-as-name-identifier'
'frederikhors/Variable-'delete'-collides-with-builtin-function'
2020-01-30 09:49:22 -08:00
frederikhors
e4d1e16935 Variable 'delete' collides with builtin function 2020-01-29 14:59:47 +01:00
frederikhors
827256e4d7 Redundant types in composite literals 2020-01-29 14:08:11 +01:00
frederikhors
9c764f69fe Redundant type conversion 2020-01-29 14:04:44 +01:00
frederikhors
89a17c17c4
Repetition range replaceable by '+' 2020-01-29 13:14:14 +01:00
Aaron L
a7b9d57691 Move mocks so external packages can use them 2019-01-20 09:45:26 -08:00
Aaron L
470b7c0488 Fix bug in remember 2019-01-12 11:30:39 -08:00
Aaron L
90eb33a4b1 Fix panic in JSON renderer on empty body 2018-12-07 09:32:45 -08:00
Rodrigo Argüello Flores
63e9512667
Fix default.Rules lowercase condition 2018-11-10 19:36:44 +09:00
Aaron L
931ccfba1f Add twofactor setup e-mail validation options 2018-11-01 22:49:25 -07:00
Aaron L
3944d57c9d Make the default json renderer write a status 2018-10-28 22:58:00 -07:00
Aaron L
d84ea6fac5 Fix default responder's content-type check
- Fix #189
2018-09-27 22:06:56 -07:00
Aaron L
8213e87e83 Rewrite docs to 80 cols
- Fix #183
2018-09-15 15:39:26 -07:00
Aaron L
13e6714c87 Change redirector to do more API-like things
- Add an option to coerce HTTP 307/308 -> 200 for API redirects
- Change the status message to always show up during a redirect.
2018-09-12 17:11:23 -07:00
Aaron L
98147bc020 Fix several lint errors 2018-09-03 16:34:10 -07:00
Aaron L
4420666f2b Split 2fa pages apart
- Add a config option to control the authboss.Middleware redirecting
2018-09-03 11:57:25 -07:00
Aaron L
e4badae1ee Add recovery code logins to sms 2018-08-26 15:43:35 -07:00
Aaron L
bdb449c0f6 Add sms 2fa
- Add sms 2fa module
- Refactor recovery code bit out
- Fix some bugs in totp 2fa
2018-08-26 12:54:14 -07:00
Aaron L
735cbb1ec5 Add totp2fa module 2018-08-22 21:34:38 -07:00
Aaron L
6164dd8da4 Finish otp module 2018-07-17 15:25:25 -07:00
Aaron L
48e83e1a2a WIP 2018-07-17 07:09:38 -07:00
Aaron L
c38f79490b Increase testing coverage.
- Missed some actual tests, added them.
- Added a bunch of useless tests to increase coverage. Guilty as
  charged.
2018-05-14 14:27:33 -07:00
Aaron L
e9c5d3e13c Add real smtp tests
- Allow users to test the smtp mailer by sending themselves e-mails
- Add a protection to ensure that either the HTML or the Text body
  exists so we never send blank e-mails.
- Fix a bug where if the html body was blank, the mime section for it
  was still set and therefore gmail and (probably) other clients would
  show a blank e-mail instead of the content in the text e-mails.
2018-05-12 23:57:43 -07:00
Aaron L
63888bdfc1 Add JSON Renderer and JSON body reading. 2018-05-09 07:59:19 -07:00
Aaron L
08645c0811 Flush out default valuer implementations 2018-04-30 18:18:30 -07:00
Aaron L
ec8be783fd Add some basic pluralization to rules 2018-04-30 18:18:03 -07:00
Aaron L
3c6c19e2e8 Fix nil bug in responder 2018-04-30 18:17:40 -07:00
Aaron L
ee4b2658d5 Finish TODOs 2018-03-09 13:11:08 -08:00
Aaron L
634892e29c Fix breakages from last commit 2018-03-07 16:41:58 -08:00
Aaron L
f071b741da Fix some tests 2018-03-07 11:15:00 -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
d4f8d2f292 Finish auth module 2018-02-20 08:58:59 -08:00
Aaron L
7f97d632d0 Clean up defaults package a bit 2018-02-16 09:55:45 -08:00
Aaron L
f585b35cfb Move docs in defaults to defaults.go 2018-02-14 15:11:59 -08:00
Aaron L
d4f4f6c443 Rewrite auth module
Discovered many problems with the abstractions along the way
and did small fixes to get to the end of the auth module.

- Use more constants for random strings
- Create forcing functions to deal with the upgrades to different
  interfaces
2018-02-04 21:24:55 -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
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
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
2db3a3f782 Fix the tests in defaults package
- Make the default responder aggregate data, this allows aggregation of
  data from various middlewares like csrf or extra data for the layout
  without having to have an extra callback function like LayoutDataMaker
  or CRSFMaker
2018-02-01 10:25:54 -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
0e9761ddf5 Start moving default implementations 2018-01-29 13:14:55 -08:00