Release 0.2.0 - #1
Open
GuilhermeBarile wants to merge 70 commits into
Open
GuilhermeBarile wants to merge 70 commits into
GuilhermeBarile wants to merge 70 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 0.2.0
This is a breaking rewrite of the package compared with
master/ 0.1.x. It introduces a provider-based auth architecture, database-backed roles and relations, OAuth/session hardening, a reusable user-management API, and modern CI/test coverage.No compatibility or migration path from previous releases is provided for this release.
Breaking changes
>=8.2(previously>=5.3).Objectiveweb\Authis now an abstract provider contract instead of a PDO-backed concrete implementation.Authhas been removed.Objectiveweb\Auth\DBAuthand usesobjectiveweb/db ^0.8.0.BasicAuthis now a complete in-memory provider for tests/dev/small setups.Objectiveweb\Auth\AuthControllerwas replaced by controllers underObjectiveweb\Auth\Controller\*.PasswordMismatchExceptionwas removed; authentication failures use the current auth/user exception model.src/password.php) was removed.Objectiveweb\Auth\.provider+uid).Provider architecture
DBAuth
Added
DBAuthas the database-backed provider:disabled_at;token_expires_at/ configurable TTL;objectiveweb/db;GROUP_CONCAT.BasicAuth
Added a full in-memory provider implementing the same practical contract as
DBAuth:Authentication and session security
Authorization
Added role- and relation-based authorization:
Auth::ANONYMOUS,AUTHENTICATEDandALLaccess markers;RequireRolerouter middleware;user_can()checks for global roles, delegated users and arbitrary resource relations;User-management API
Added
Objectiveweb\Auth\Controller\UserController, protected by theadminrole, with support for:Management hardening includes:
provider/profileare rejected on normal user updates;Auth controller
The new
Objectiveweb\Auth\Controller\AuthControllerseparates authentication concerns from admin user management and supports:OAuth
Added/reworked
OAuthControllerwith:redirectUriwith request-derived fallback;Database schema and migrations
Added bundled Phinx migrations for the default DBAuth model:
user;user_credentials;role;user_roles;delegations.The default user schema includes:
disabled_at;Credential schema includes provider/UID identity, profile, token, last-login and creation fields.
Migrations intentionally use logical table names and remain compatible with application-level Phinx/database prefixes.
Correctness fixes
GROUP_CONCAT.Tooling and dependencies
objectiveweb/db ^0.8.0.composer validate --strict.CI and tests
GitHub Actions now runs:
The test suite now includes dedicated coverage for:
Documentation
README was rewritten for the 0.2.0 architecture and now documents: