Commit Graph

15 Commits

Author SHA1 Message Date
Barnaby Walters 7a62d38333 Minor changes for PHP 7.3 compatibility 2021-06-24 13:29:39 +02:00
Barnaby Walters 87bfe33443 Added additional logging 2021-06-18 16:33:39 +02:00
Barnaby Walters 896f661a7f Installed Psalm, set up static analysis
Fixed a couple of minor issues
2021-06-15 00:51:04 +02:00
Barnaby Walters bf16d0eb55 Improved some tests, got to 95% coverage 2021-06-13 15:30:58 +02:00
Barnaby Walters 61aa7f55f9 Refactored TokenStorageInterface for an improved flow
* Now passing an auth code data validation callback to the exchange method
* Removed Token, it’s no longer necessary
* Simplified interface where possible
* All tests passing
* Updated docblocks
2021-06-13 14:34:37 +02:00
Barnaby Walters 62d02dacc0 Added a bunch of extra documentation 2021-06-13 00:01:32 +02:00
Barnaby Walters db39fff517 Server at 100% test coverage 2021-06-10 20:46:01 +02:00
Barnaby Walters c3b4e5ec5b Started implementing token exchange, tests 2021-06-10 18:23:21 +02:00
Barnaby Walters 9fc7299232 Added auth request parameter validation, tests. Started work on exchange methods 2021-06-10 18:18:49 +02:00
Barnaby Walters bfadaf2fb2 Updated Server and tests to work with new TokenStorageInterface 2021-06-10 14:11:58 +02:00
Barnaby Walters ec27c48946 Reworked TokenStorageInterface, changed JsonStorage
* TokenStorageInterface is now responsible for accessing both auth codes
  and access tokens
* TokenStorageInterface now only defines the methods strictly required
  for IndieAuth to work
* TokenStorageInterface now responsible for generating the auth code,
  making self-encoded codes possible.
* TokenStorageInterface now responsible for token lifetimes, expiry,
  and exchange
* JsonStorage implements new methods, all disk access is wrapped with
  lock acquisition

Tests not yet updated!
2021-06-09 23:46:33 +02:00
Barnaby Walters 6d5e93b07c Refactored Exception Handling, mostly tested authorization request handler
* Internal error conditions now raise IndieAuthException
* Bubbled unknown exceptions converted to generic IndieAuthException
* Exceptions passed to overridable handler, turned into response
* Wrote many more tests, fixed a variety of problems
2021-06-09 00:06:35 +02:00
Barnaby Walters b2c4f8eee5 Created default authorization and authentication callbacks
* Created corresponding templates
* Changed how Server configuration works
* Ensured that rauthorization approval requests verify their indieauth parameters
* Wrote first passing test for Server, fixed a variety of small errors along the way
2021-06-07 20:32:02 +02:00
Barnaby Walters 825ec1c0e5 Tested FilesystemJsonStorage 2021-06-06 17:21:33 +02:00
Barnaby Walters b111c619d4 Restructured src to use PSR-4 autoloading, moved many functions to functions.php 2021-06-06 15:13:13 +02:00