-
-
Notifications
You must be signed in to change notification settings - Fork 10
Changelog
Sebastian Schendel edited this page Aug 20, 2023
·
19 revisions
- Made Auth::currentUser hookable (thank you @nloyola for the pull request 🤗)
- Added handling for WireArray and WireData Objects to AppApi::getAjaxOf()
- Improved OpenApi JSON output (big thanks to @zoeck-dev for your input 🤗)
- Big documentation update
- New "See endpoints" page under Setup->AppApi
- Overview of all registered endpoints and the location of their handler functions
- Generation of OpenAPI 3.0.3 json
- Added optional index 5 to the routes definition array that can hold documentation data
- Update dependencies
- Bugfix username/email authentication in combination
- Changed JSON type of the db-field logintype to LONGTEXT. Some MariaDB versions seem to have problems with JSON as type.
- Some bugfixes for using email-password-authentication.
- Add optional login via email - activatable in the app-settings (big thanks to @laikmosh for the pull-request 🤗)
- Improve route merging + filter duplicates
- Allow deactivating url hook via module config
- Added ProcessWire url hook to handle api-requests instead of pageNotFound hook (thank you kongondo and @adrianbj 🤗)
- Improved logging, write requested urls
- AppApi::getAjaxOf(): Added handling for FieldtypeOptions
- Bugfix for PHP 8: Handling of NULL-dates (thank you @adrianbj for going down the rabbit hole with me 🤗)
- Improved header-handling.
- Now we take all values from
apache_request_headers()
and$_SERVER
into account - remove
REMOTE_
prefix (will be added by apache in some cases)
- Now we take all values from
- Manually decode Basic-Auth header if
PHP_AUTH_USER
orPHP_AUTH_PW
not found
- Allow third-party modules to register custom routes (see 4.0: AppApi Modules for more infos)
- A Change in the route-merging-order now allows you to overwrite the default routes (*, /auth and /auth/access) if you need that.
- Fixed a bug when restricting a route to an array of applications (thank you @wskyjames for reporting it 🤗)
- Auth-Api: Allow login credentials in different formats (e.g. POST Body in JSON, Form-URL-Encoded, Multipart) (thank you @csaggo.com for reporting it 🤗)
- Adds
Router->registerErrorHandlers()
Hook, that should allow you to overwrite the general error- and warning handlers of the module. - Allows Apikey & Auth-token to be set as GET-params
- Fixes a bug that made it possible to authenticate with the PHP session (cookie) even though token-auth was enabled.
- Adds
Router->setCorsHeaders()
Hook - Updated Composer & Firebase dependencies
- Fixes a critical error that occured with ProcessWire versions >= 1.0.173 (thank you @csaggo.com and @psy for reporting it 🤗)
- Fixes an issue with routes including query-parameters (by @twinklebob, thanks for PR 🤗)
- Fixes an issue with the constructor signature of the modules AppApiException class (by @twinklebob, thanks for PR 🤗)
- Fixes an issue with the error-handler, which made it mistakenly catch errors that should have been ignored via @ operator (Thanks to @eelke)
- Switched from
wire('input')->url
to$_SERVER['REQUEST_URI']
for reading the base-url, because ProcessWire's internal function transferred everything to lowercase (Thanks to @pauldro)
- Fixes an error that occurred when something other than an array was to be output as response
- Fixes critical issue "incorrect integer value" that happened in some db-configurations
- Improved AppApi-dashboard
- Allow multiple levels to routing config (by @twinklebob, thanks for PR 🤗)
- Allow requests without an api-key: You can now mark an application as "default application". If you did so, every request without an apikey will be linked with that application.
- You can now set a custom response-code in case of success. Simply include your response-code number on key "responseCode" in your result-array.
- Optional access-logging: You can enable access-logging in the module's configuration. After that, every successful request will be logged with it's application-id, apikey-id and token-id.
- Added hooks to all essential functions - that should enable you to customize the module's behavior even more. E.g. you could add custom logging on a hook, if you need that
- Database-scheme does not need foreign-key constraints any more. That should fix @thomasaull 's issue with db-backups. After the update, you must remove the constraint manually because I did not find a way to remove the foreign key safely in all database-environments.
- Multiple other bugfixes
- Usage of
ProcessPageView::pageNotFound
-hook to allow other modules and functions to initialize before the api renders. - The path to
Routes.php
is now configurable via module's settings (Thanks to @thomasaull and @spoetnik)
- Bugfix in Router.php (Thanks to @thomasaull)
- Documentation improvements
- Changed all auth-routes to the /auth (or /auth/access) endpoints.
- Updated readme and examples
- Rewritten most of the code
- Setup application management ui
- New authentication methods
AppApi
Connect your apps to ProcessWire!
ProcessWire-Module: | https://modules.processwire.com/modules/app-api/ |
Support-Forum: | https://processwire.com/talk/topic/24014-new-module-appapi/ |
Repository: | https://github.com/Sebiworld/AppApi |
Wiki: | https://github.com/Sebiworld/AppApi/wiki |