OAuth client integration for Symfony. Supports both OAuth1.0a and OAuth2.
null
as $registrationForm
in RegisterController
by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1983
AuthenticationFailureHandler
by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1986
Full Changelog: https://github.com/hwi/HWIOAuthBundle/compare/2.1.0...2.2.0
For details go and read the CHANGELOG file.
The main changes:
FOSUserBundle
,For details go and read the CHANGELOG file.
Full Changelog: https://github.com/hwi/HWIOAuthBundle/compare/2.0.0-BETA3...2.0.0
Templating\Helper\OAuthHelper
was merged into Twig\Extension\OAuthRuntime
,TYPE
constant or is null
, then key will be calculated by converting its class name without ResourceOwner
suffix to snake_case
, if neither is felt, then \LogicException
will be thrown,UserResponseInterface::getUsername()
was deprecated in favour of UserResponseInterface::getUserIdentifier()
to match changes in Symfony Security component,@internal
resourceOwner oauth types in Configuration are calculated automatically by scandir. All classes extended from GenericOAuth[X]ResourceOwner
get oauth[X]
type. If class only implements ResourceOwnerInterface then its oauth type is unknown
. ResourceOwner key (parameter type
in configs) should have defined ResourceOwner::TYPE constant. Each user defined custom ResourceOwner class that implemented ResourceOwnerInterface
will be registered automatically. If autoconfigure
option is disabled user have to add the tag hwi_oauth.resource_owner
to the service definition,ConnectController
was split into two smaller ones, Connect\ConnectController
& Connect\RegisterController
,OAuth1ResourceOwner
& OAuth2ResourceOwner
to cover case of implementing custom oauth resource owners,CleverResourceOwner::doGetRequest
,TransportExceptionInterface
in AbstractResourceOwner::getResponseContent()
method,OAuthUserProvider::loadUserByOAuthUserResponse()
when nickname
is not available in OAuth response,firebase/php-jwt
library,Templating\Helper\OAuthHelper
class directly into Twig\Extension\OAuthRuntime
by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1888
OAuth1ResourceOwner
& OAuth2ResourceOwner
by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1889
ConnectController
& split it into smaller ones by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1887
RefreshOAuthTokenCompilerPass
class quality by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1881
getIdentifier()
into PathUserResponse
to match Symfony changes by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1883
SensioConnectUserResponse
by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1894
TransportExceptionInterface
in AbstractResourceOwner::getResponseContent()
method by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1911
loadUserByOAuthUserResponse()
when nickname
is not available in OAuth response by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1913
symfony/templating
by @GromNaN in https://github.com/hwi/HWIOAuthBundle/pull/1940
Full Changelog: https://github.com/hwi/HWIOAuthBundle/compare/2.0.0-BETA2...2.0.0-BETA3
firewall_names
, firewalls are now computed automatically - all firewalls that have defined oauth
authenticator/provider will be collected,GenericOAuth2ResourceOwner
resource owners), if option refresh_on_expire
set to true
,refresh_on_expure
set to true
,@internal
) Removed/replaced redundant argument $firewallNames
from controllers. If controller class was copied and replaced, adapt list of arguments: In controller use $resourceOwnerMapLocator->getFirewallNames()
,RefreshTokenListener
cannot be lazy. If current firewall is lazy (or anonymous: lazy) then current auth token is often initializing on kernel.response
. In this case new access token will not be stored in session. Therefore, the expired token will be refreshed on each request,InteractiveLoginEvent
will be triggered also for OAuthAuthenticator
,*.xml
to *.php
(services and routes). Xml routing configs connect.xml
, login.xml
and redirect.xml
are steel present but deprecated. Please use *.php
variants in your includes instead.hwi_oauth.connect.confirmation
parameter by @franmomu in https://github.com/hwi/HWIOAuthBundle/pull/1756
Makefile
in favour of composer scripts by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1766
connect
option is not enabled by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1782
connect
configuration is not set but ConnectController
was used by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1844
RememberMeBadge
into OAuth passport by @stloyd in https://github.com/hwi/HWIOAuthBundle/pull/1846
Full Changelog: https://github.com/hwi/HWIOAuthBundle/compare/1.4.5...2.0.0-BETA2
>=5.1
& <5.4
(still with BC layer included),OAuthExtension
is now a lazy Twig extension using a Runtime,FOSUserBundle
,process()
argument for Form/RegistrationFormHandlerInterface
, from Form $form
to FormInterface $form
,Resources/views/Connect/connect_confirm.html.twig
from fos_user_registration_register
to registration_register
,fosub
from oauth_user_provider
,hwi_oauth.fosub
, & all related DI parameters,hwi_oauth.registration.form.factory
in favour of declaring form class name as DI parameter: hwi_oauth.connect.registration_form
,ResourceOwnerMapInterface::hasResourceOwnerByName
signature, update if you use a custom resource owner,ResourceOwnerMapInterface::getResourceOwnerByName
signature, update if you use a custom resource owner,ResourceOwnerMapInterface::getResourceOwnerByRequest
signature, update if you use a custom resource owner,ResourceOwnerMapInterface::getResourceOwnerCheckPath
signature, update if you use a custom resource owner,ResourceOwnerMap
uses service locator instead of DI container,hwi_oauth.abstract_resource_owner.generic
, hwi_oauth.abstract_resource_owner.oauth1
& hwi_oauth.abstract_resource_owner.oauth2
,setName()
method from OAuth/ResourceOwnerInterface
,__construct()
argument for OAuth/ResourceOwner/AbstractResourceOwner
, from HttpMethodsClient $httpClient
to HttpClientInterface $httpClient
,php-http/httplug-bundle
with symfony/http-client
hwi_oauth.http
configuration,src/
,tests/
,Resources/doc
into: docs/
,methods
requirements:
hwi_oauth_connect_service
: GET
& POST
,hwi_oauth_connect_registration
: GET
& POST
,hwi_oauth_connect
: GET
,hwi_oauth_service_redirect
: GET
,5.4
& 6.0
,Full Changelog: https://github.com/hwi/HWIOAuthBundle/compare/1.4.5...2.0.0-BETA1
Changelog:
AbstractOAuthToken::getCredentials()
method,Changelog:
VkontakteResourceOwner
option: api_version
to not point to deprecated one,RequestStack::getMasterRequest()
is deprecated since Symfony 5.3, use RequestStack::getMainRequest()
if exists,GenericOAuth1ResourceOwnerTestCase
, GenericOAuth2ResourceOwnerTestCase
& ResourceOwnerTestCase
test case classes for easier unit testing custom resource ownersChangelog:
@final
declaration from OAuthFactory
& FOSUBUserProvider
,.gitattributes
to reduce amount of code in archives,Changelog:
hwi_oauth.connect.confirmation
parameter,