All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Please check the Upgrading Instructions when upgrading to a newer version.
- Initiating User Registration via OpenID Connect. (rhertogh)
- Addition of all extra claims in access token to request. (m.vanderzijden)
- Altered scope of getRequestOauthClaim function to public. (m.vanderzijden)
- Centralized JWTConfiguration to Oauth2Module. (m.vanderzijden)
- Updated composer dependencies (notably "symfony/process" to v5.4.46 for https://github.com/advisories/GHSA-qq5c-677p-737q) (rhertogh)
- Support for OpenID Connect RP-Initiated Logout. (rhertogh)
- Added
Oauth2Module::$httpClientErrorsLogLevel
in order to specify a log level for HTTP client error responses. (rhertogh) - Added DB driver info and logo to .bashrc
- Support for SQLite. (rhertogh)
- Ability to run sample app from a single Docker container (using SQLite). (rhertogh)
- Added setters for module repositories. (rhertogh)
- Added support for custom claims in access token and include
client_id
by default. (rhertogh) - Added support for token revocation RFC 7009. (rhertogh)
- Added Interfaces for controllers and actions (NickvdMeij)
- The
tests
now use the same environment variable name for the DB driver as the sample app (YII2_OAUTH2_SERVER_TEST_DB_DRIVER
->YII_DB_DRIVER
). (rhertogh) - The namespace and inheritance of
Oauth2OidcBearerTokenResponse
have changed to allow the usage of a more genericOauth2BearerTokenResponse
. (rhertogh) - The
Oauth2ScopeAuthorizationRequestInterface
and implementing classes are renamed toOauth2ClientScopeAuthorizationRequestInterface
(note the "Client" part). (rhertogh) - The "authorization" classes and interfaces have been refactored in more separate entities for reusability. (rhertogh)
- Allow
null
values forOauth2Client
$uri
and$postLogoutRedirectUris
. (rhertogh)
- Added health checks to docker compose files for MySQL and PostgreSQL. (rhertogh)
- Postman can now be used to connect to the
tests
instance (redirect_uri has been added). (rhertogh)
- Require TLS connection except for localhost (can be configured via
Oauth2Module::$nonTlsAllowedRanges
). (rhertogh)
Oauth2ClientInterface
"ScopeAccess" has been split into "AllowGenericScopes" and "ExceptionOnInvalidScope". (rhertogh)- The
$unknownScopes
parameter has been added toOauth2ClientInterface::validateAuthRequestScopes()
(rhertogh) - The
$requestedScopeIdentifiers
parameter forOauth2ClientInterface::getAllowedScopes()
now acceptstrue
which will return all available scopes. (rhertogh)
Oauth2ClientInterface
"ScopeAccess" related constants. (rhertogh)
- Incorrect ClientScope relation in
Oauth2Client::getAllowedScopes()
. (rhertogh)
- The
yii oauth2/client/view
console command now supports scopes. (rhertogh)
- It's now possible to specify "environment variables configuration" for Oauth2 Clients which allows env var usage in secrets and redirect URIs. (rhertogh)
- You can now generate a secret via the command line (
yii oauth2/encryption/generate-secret
). (rhertogh)
- The
EnvironmentHelper
class was added with the functionparseEnvVars()
to aid in the replacing of env vars in strings. (rhertogh)
- Renamed the
Oauth2EncryptorInterface
(and all related classes/functions) toOauth2CryptographerInterface
to better reflect its purpose and future use. (rhertogh) - The
redirectUris
for theOauth2Client
now supports an env var that contains a JSON array and now requires used env vars to be allow-/deny-listed. (rhertogh)
- Upgraded
league/oauth2-server
to v8.4.2 for https://github.com/advisories/GHSA-wj7q-gjg8-3cpm. (rhertogh)
- Support for default values in
Oauth2GeneratePatAction
. (rhertogh) - The
Oauth2ClientInterface
now definesget
- andset
-MinimumSecretLength
. (rhertogh) - Support for importing data from other projects. (rhertogh)
- The
Oauth2UserInterface
now defines the necessarygetId()
function. (rhertogh)
- Refactored and added tests for defaultAccessTokenTTL. (rhertogh)
- Made PHP CodeSniffer and PHP CS fixer happier. (rhertogh)
- Only advice user to add Oauth2 migration namespace to
migrationNamespaces
if not yet done. (rhertogh)
- Added
Oauth2Module::$openIdConnectProviderConfigurationInformationPath
to configure OIDC config info endpoint. (rhertogh) - Additional getters and setters for Client properties. (rhertogh)
- Added
Oauth2ClientInterface::syncClientScopes()
to add/remove/update the client-scope relation. (rhertogh) - Added CLI controllers for listing/viewing/updating/deleting clients. (rhertogh)
- The
Oauth2ModelRepositoryInterface
now extendsOauth2RepositoryInterface
and introducedfindModelByPk($pk)
. (rhertogh) - The
Oauth2RepositoryIdentifierTrait
is renamed toOauth2ModelRepositoryTrait
and introducedfindModelByPk($pk)
. (rhertogh)
- The
Oauth2ActiveRecordIdInterface
andOauth2ActiveRecordIdTrait
have been removed, their functionality has been replaced by theOauth2ActiveRecordInterface
andOauth2ActiveRecordTrait
respectively. (rhertogh)
- Oauth authorization and access token responses set correct
Content-Type: application/json; charset=UTF-8
headers (raimon-segura, rhertogh) (#13) - Migrations now handle
tinyint
,smallint
andbigint
data types foruser
table primary key correctly (mtangoo, rhertogh) (#14)
- The
\rhertogh\Yii2Oauth2Server\helpers\Psr7Helper::psr7ToYiiResponse()
function now sets the response format as "raw" by default accepts an additionaldefaultConfig
parameter. (rhertogh)
- Support for environment variables in Oauth2Client
redirect_uris
. (rhertogh)
- Test coverage. (rhertogh)
- An Oauth2Client can now be configured to accept a variable query part in the redirect URI (
allow_variable_redirect_uri_query
). (rhertogh)
- Using
true
(instead of1
) as defautl value for DB columnuser.enabled
. (rhertogh)
- Generated base models with new
::class
constant. (rhertogh)
- Upgraded
league/oauth2-client
to v2.7.0 to support PKCE natively. (rhertogh)
- Removed custom implementation for oauth2-client PKCE since it's now supported by the library. (rhertogh)
- Cancel running GitHub jobs in progress when PR is updated. (rhertogh)
- Upgraded
guzzlehttp/psr7
to v2.5.0 for https://github.com/advisories/GHSA-wxmh-65f7-jcvw. (rhertogh)
- Upgraded
league/oauth2-server
to v8.4.1 which includes a fix to prevent PKCE Downgrade Attack. (rhertogh)
- Include
redirectUri
inOauth2ClientAuthorizationRequest::__serialize()
. FixesOauth2ClientAuthorizationRequest::isClientIdentifiable()
, which in turn caused client authorization to always be required in case the authorization request needed to be stored between requests (e.g. when the user was not logged in). (rhertogh)
- Support for
skipAuthorizationIfScopeIsAllowed
inOauth2Module::createClient()
. (rhertogh)
- Fixed
$clientSecret
passing as true when$client->isConfidential()
isfalse
. (ms48) (#8) - Removed
lcobucci/clock
andsymfony/deprecation-contracts
as dependency fromcomposer.json
to solve version constraint issues (mtangoo, rhertogh) (#11)
Oauth2UserInterface::isOauth2ClientAllowed()
to support access restriction to user/client/grant combinations. (rhertogh) (#5)- Sample app now includes client for 'Client Credentials' grant without a user. (rhertogh)
- Support for "personal access tokens" (see
Oauth2Module::generatePersonalAccessToken()
). (rhertogh) Oauth2UserPatTrait
for easy generating "personal access tokens" from the user model. (bada02) (#7)Oauth2ScopeInterface::APPLIED_BY_DEFAULT_IF_REQUESTED
to support allowing scopes for clients without user approval. (rhertogh)- Check for openssl php extension when using JWKS. (rhertogh)
Oauth2ClientAuthorizationRequestInterface::getScopesAppliedByDefaultAutomatically()
is renamed togetScopesAppliedByDefaultWithoutConfirm()
. (rhertogh)
- Removed
Oauth2PasswordGrantUserComponentInterface
in favor of events andOauth2UserInterface::isOauth2ClientAllowed()
. (rhertogh)
- Mysql port configuration now uses separated port parameter. (rhertogh)
- Test coverage. (rhertogh)
- PostgreSQL compatibility. (mtangoo, rhertogh) (#3)
- Optimized tests to reuse database fixtures. (rhertogh)
- Added setters for common properties of Oauth2Client. (rhertogh)
- Allow configuration of Oauth2ClientScopes in
Oauth2Module::createClient()
. (rhertogh)
Oauth2ClientAuthorizationRequestInterface::isAuthorizationNeeded()
now correctly adheres toOauth2Client::skipAuthorizationIfScopeIsAllowed()
. (rhertogh)- Compatibility for lcobucci/jwt 4.2.x causing "Lcobucci\JWT\Signer\InvalidKeyProvided: Key cannot be empty". (rhertogh)
- Support for Client Secret Rotation. (rhertogh)
- Support for Encryption Key Rotation. (rhertogh)
- Added
Oauth2ClientInterface::setGrantTypes()
. (rhertogh) - Support
Oauth2BaseClientAuthorizationRequest
"Max Age" without OIDC. (rhertogh)
- Accept string array for
$scopes
parameter inOauth2Module::createClient
. (rhertogh)
- Changed signature for
Oauth2Module::createClient
to make$secret
optional. (rhertogh)
- Support for custom scope authorization message. (rhertogh)
- Allow more easily customization of scopes by merging claims of previously defined scopes. (rhertogh)
- Added
Oauth2Module::createClient()
method to aid in the programmatic creation of clients. (rhertogh) - Added documentation for OIDC claims. (rhertogh)
- Support for PHP 8.1. (rhertogh)
- Using correct access token TTL. (rhertogh)
- Type-casted the type so the
Oauth2Client::isConfidential()
function works as intended. (Roosh Ak) (#1)
- Several code style fixes. (rhertogh)
- Initial release. (rhertogh)