Symfony bundle which provides OAuth 2.0 authorization/resource server capabilities

Overview

Trikoder OAuth 2 Bundle

Build Status Latest Stable Version License Code coverage

Symfony bundle which provides OAuth 2.0 authorization/resource server capabilities. The authorization and resource server actors are implemented using the thephpleague/oauth2-server library.

Important notes

This bundle provides the "glue" between thephpleague/oauth2-server library and Symfony. It implements thephpleague/oauth2-server library in a way specified by its official documentation. For implementation into Symfony project, please see bundle documentation and official Symfony security documentation.

Status

This package is currently in the active development.

Features

  • API endpoint for client authorization and token issuing
  • Configurable client and token persistance (includes Doctrine support)
  • Integration with Symfony's Security layer

Requirements

Installation

  1. Require the bundle and a PSR 7/17 implementation with Composer:

    composer require trikoder/oauth2-bundle nyholm/psr7

    If your project is managed using Symfony Flex, the rest of the steps are not required. Just follow the post-installation instructions instead! šŸŽ‰

    NOTE: This bundle requires a PSR 7/17 implementation to operate. We recommend that you use nyholm/psr7. Check out this document if you wish to use a different implementation.

  2. Create the bundle configuration file under config/packages/trikoder_oauth2.yaml. Here is a reference configuration file:

    trikoder_oauth2:
        authorization_server: # Required
    
            # Full path to the private key file.
            # How to generate a private key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
            private_key:          ~ # Required, Example: /var/oauth/private.key
    
            # Passphrase of the private key, if any.
            private_key_passphrase: null
    
            # The plain string or the ascii safe string used to create a Defuse\Crypto\Key to be used as an encryption key.
            # How to generate an encryption key: https://oauth2.thephpleague.com/installation/#string-password
            encryption_key:       ~ # Required
    
            # The type of value of "encryption_key".
            encryption_key_type:  plain # One of "plain"; "defuse"
    
            # How long the issued access token should be valid for, used as a default if there is no grant type specific value set.
            # The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
            access_token_ttl:     PT1H
    
            # How long the issued refresh token should be valid for, used as a default if there is no grant type specific value set.
            # The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
            refresh_token_ttl:    P1M
    
            # How long the issued authorization code should be valid for.
            # The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
            auth_code_ttl:        ~ # Deprecated ("trikoder_oauth2.authorization_server.auth_code_ttl" is deprecated, use "trikoder_oauth2.authorization_server.grant_types.authorization_code.auth_code_ttl" instead.)
    
            # Whether to require code challenge for public clients for the authorization code grant.
            require_code_challenge_for_public_clients: ~ # Deprecated ("trikoder_oauth2.authorization_server.require_code_challenge_for_public_clients" is deprecated, use "trikoder_oauth2.authorization_server.grant_types.authorization_code.require_code_challenge_for_public_clients" instead.)
    
            # Whether to enable the authorization code grant.
            enable_auth_code_grant: ~ # Deprecated ("trikoder_oauth2.authorization_server.enable_auth_code_grant" is deprecated, use "trikoder_oauth2.authorization_server.grant_types.authorization_code.enable" instead.)
    
            # Whether to enable the client credentials grant.
            enable_client_credentials_grant: ~ # Deprecated ("trikoder_oauth2.authorization_server.enable_client_credentials_grant" is deprecated, use "trikoder_oauth2.authorization_server.grant_types.client_credentials.enable" instead.)
    
            # Whether to enable the implicit grant.
            enable_implicit_grant: ~ # Deprecated ("trikoder_oauth2.authorization_server.enable_implicit_grant" is deprecated, use "trikoder_oauth2.authorization_server.grant_types.implicit.enable" instead.)
    
            # Whether to enable the password grant.
            enable_password_grant: ~ # Deprecated ("trikoder_oauth2.authorization_server.enable_password_grant" is deprecated, use "trikoder_oauth2.authorization_server.grant_types.password.enable" instead.)
    
            # Whether to enable the refresh token grant.
            enable_refresh_token_grant: ~ # Deprecated ("trikoder_oauth2.authorization_server.enable_refresh_token_grant" is deprecated, use "trikoder_oauth2.authorization_server.grant_types.refresh_token.enable" instead.)
    
            # Enable and configure grant types.
            grant_types:
                authorization_code:
    
                    # Whether to enable the authorization code grant.
                    enable:               true
    
                    # How long the issued access token should be valid for the authorization code grant.
                    access_token_ttl:     ~
    
                    # How long the issued refresh token should be valid for the authorization code grant.
                    refresh_token_ttl:    ~
    
                    # How long the issued authorization code should be valid for.
                    # The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
                    auth_code_ttl:        PT10M
    
                    # Whether to require code challenge for public clients for the authorization code grant.
                    require_code_challenge_for_public_clients: true
                client_credentials:
    
                    # Whether to enable the client credentials grant.
                    enable:               true
    
                    # How long the issued access token should be valid for the client credentials grant.
                    access_token_ttl:     ~
                implicit:
    
                    # Whether to enable the implicit grant.
                    enable:               true
    
                    # How long the issued access token should be valid for the implicit grant.
                    access_token_ttl:     ~
                password:
    
                    # Whether to enable the password grant.
                    enable:               true
    
                    # How long the issued access token should be valid for the password grant.
                    access_token_ttl:     ~
    
                    # How long the issued refresh token should be valid for the password grant.
                    refresh_token_ttl:    ~
                refresh_token:
    
                    # Whether to enable the refresh token grant.
                    enable:               true
    
                    # How long the issued access token should be valid for the refresh token grant.
                    access_token_ttl:     ~
    
                    # How long the issued refresh token should be valid for the refresh token grant.
                    refresh_token_ttl:    ~
        resource_server:      # Required
    
            # Full path to the public key file.
            # How to generate a public key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
            public_key:           ~ # Required, Example: /var/oauth/public.key
    
        # Scopes that you wish to utilize in your application.
        # This should be a simple array of strings.
        scopes:               []
    
        # Configures different persistence methods that can be used by the bundle for saving client and token data.
        # Only one persistence method can be configured at a time.
        persistence:          # Required
            doctrine:
    
                # Name of the entity manager that you wish to use for managing clients and tokens.
                entity_manager:       default
            in_memory:            ~
    
        # The priority of the event listener that converts an Exception to a Response.
        exception_event_listener_priority: 10
    
        # Set a custom prefix that replaces the default "ROLE_OAUTH2_" role prefix.
        role_prefix:          ROLE_OAUTH2_
  3. Enable the bundle in config/bundles.php by adding it to the array:

    Trikoder\Bundle\OAuth2Bundle\TrikoderOAuth2Bundle::class => ['all' => true]
  4. Update the database so bundle entities can be persisted using Doctrine:

    bin/console doctrine:schema:update --force
  5. Import the routes inside your config/routes.yaml file:

    oauth2:
        resource: '@TrikoderOAuth2Bundle/Resources/config/routes.xml'

You can verify that everything is working by issuing a POST request to the /token endpoint.

ā® NOTE āÆ It is recommended to control the access to the authorization endpoint so that only logged in users can approve authorization requests. You should review your security.yml file. Here is a sample configuration:

security:
    access_control:
        - { path: ^/authorize, roles: IS_AUTHENTICATED_REMEMBERED }

Configuration

Contributing

Please see CONTRIBUTING for details.

Versioning

This project adheres to Semantic Versioning 2.0.0. Randomly breaking public APIs is not an option.

However, starting with version 4, we only promise to follow SemVer on structural elements marked with the @api tag.

Changes

All the package releases are recorded in the CHANGELOG file.

Reporting issues

Use the issue tracker to report any issues you might have.

License

See the LICENSE file for license rights and limitations (MIT).

Comments
  • Allow custom uris for mobile app like com.example.test123:/uri/redireā€¦

    Allow custom uris for mobile app like com.example.test123:/uri/redireā€¦

    As the redirect uri can be a url but also a custom uri path as described here https://developers.google.com/identity/protocols/oauth2/native-app#custom-uri-scheme

    We can't only rely on the filter_var to check if the URI is valid.

    opened by AnthonyMatignonCR 22
  • Error in token controller

    Error in token controller

    Hey I got this error on calling token route:

    Cannot autowire argument $serverRequest of "trikoder.oauth2.controller.token_controller:indexAction()": it references interface "Psr\Http\Message\ServerRequestInterface" but no such service exists. Did you create a class that implements this interface?

    question 
    opened by asalisaf 19
  • Symfony 4.4.* & 5.0.* (In Review)

    Symfony 4.4.* & 5.0.* (In Review)

    Hello again,

    I don't expect this to get merged, but I still wanted to get the pull request going just for reference, in case it helps with the work being done on #118, and also to verify supported versions against your CI.

    This time around I'm doing it against master ;)

    I've made a number of improvements over my last pull request, by looking at @rbaarsma 's composer.json file:

    • Symfony 4.4.* should pass all tests on php 7.2 and php 7.3

      • with: PSR_HTTP_PROVIDER=nyholm
      • with: PSR_HTTP_PROVIDER=zendframework
    • Symfony 5.0.* should pass all tests on php 7.2 and php 7.3

      • with: PSR_HTTP_PROVIDER=nyholm
      • with: PSR_HTTP_PROVIDER=zendframework
    • This branch contains everything from both master and 2.x along with my own fixes to 2.x to make the tests pass, as submitted in #148

    • update: CI passes fully.

    opened by elchris 17
  • Add a guard implementation

    Add a guard implementation

    Hi,

    I am currently integrating the bundle into a brand new symfony 4.4 project. I wish to protect a certain route with two authentication methods, being JWT Token and OAuth2 Token, depending on the requesting party. For the JWT Token Auth I use package 'lexik/jwt-authentication-bundle`, which ships with an integrated Security Guard implementation that makes it very easy to add to a firewall section. Your package does not, but I think it would be a great enhancement.

    enhancement 
    opened by maddy2101 13
  • A Token was not found in the TokenStorage

    A Token was not found in the TokenStorage

    Hello,

    I am trying to implement your library in a project, an I'm unable to get it working. I can get an access token by going to a /token url, but after, when passing this token to my API's routes, I get a 401 unauthorized response.

    When going to the symfony profiler, I can see that a AuthenticationCredentialsNotFoundException is thrown.

    Here is my configuration :

    • Symfony 4.2.3
    • php 7.2.15

    security.yaml :

    security:
        providers:
            app_user_provider:
                entity:
                    class: Trikoder\Bundle\OAuth2Bundle\Security\Authentication\Provider\OAuth2Provider
        firewalls:
            api_token:
                pattern: ^/api/token$
                security: false
            api:
                pattern: ^/api
                security: true
                stateless: true
                oauth2: true
    
            dev:
                pattern: ^/(_(profiler|wdt)|css|images|js)/
                security: false
            main:
                anonymous: true
    

    trikoder_oauth2.yaml :

    trikoder_oauth2:
    
        authorization_server:
    
            # Full path to the private key file.
            # How to generate a private key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
            private_key: "%kernel.root_dir%/../var/oauth/private.key"
    
            # The string used as an encryption key.
            # How to generate an encryption key: https://oauth2.thephpleague.com/installation/#string-password
            encryption_key: "generated as phpleague doc says"
    
            # How long the issued access token should be valid for.
            # The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
            access_token_ttl: PT1H
    
            # How long the issued refresh token should be valid for.
            # The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
            refresh_token_ttl: P1M
    
        resource_server:
    
            # Full path to the public key file
            # How to generate a public key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
            public_key: "%kernel.root_dir%/../var/oauth/public.key"
    
        # Scopes that you wish to utilize in your application.
        # This should be a simple array of strings.
        scopes: []
    
        # Configures different persistence methods that can be used by the bundle for saving client and token data.
        # Only one persistence method can be configured at a time.
        persistence:
    
            doctrine:
    
                # Name of the entity manager that you wish to use for managing clients and tokens.
                entity_manager: default # Required
    
            #in_memory: ~
    

    I made a chmod -R a+rwx on my var/oauth folder.

    Am I missing something ?

    Thanks in advance

    question 
    opened by uxen-kv 11
  • Relaxed version constraint to allow v7.3 of oauth2-server

    Relaxed version constraint to allow v7.3 of oauth2-server

    v7.3.0 of oauth-server does not seem to introduce breaking changes. Call of finalizedScopes() (see ScopeRepository) was moved, see https://github.com/thephpleague/oauth2-server/blob/master/CHANGELOG.md#730---released-2018-11-13

    opened by gschafra 11
  • Symfony 5.0

    Symfony 5.0

    Adds Symfony 5 support and bumps minimum symfony version to 4.4 (as of January symfony 4.3 is no longer actively maintained, only security fixes and in the master of this bundle I opt to keep up with the times. If anyone uses an older version they will automatically use an older version of this bundle)

    opened by rbaarsma 9
  • Password grant token gets rejected

    Password grant token gets rejected

    I've created a client with grants set to client_credentials password.

    I can get a tokens issued with either grant type but requests made with tokens issued via password are rejected.

    The resource server rejected the request.

    Both tokens look similar in the oauth2_access_token table except the one created via password has a user_identifier that represents the user.

    Screen Shot 2019-09-24 at 8 18 08 PM

    What would cause the password generated token to be rejected, or how can I troubleshoot it?

    There's nothing to my controller that I'm getting 2 different results with:

    class ExampleController extends AbstractController
    {
        /**
         * @Route("/api/example", name="example")
         */
        public function index()
        {
            return $this->json(['status' => 1]);
            ...
    
    opened by mikemilano 9
  • Make sure tests on different sf versions are wokring

    Make sure tests on different sf versions are wokring

    I made a misstake in #83. Using --no-scripts will disable flex from running. In current master we are always using latest sf version. I wanted to run --no-scripts to avoid recipes being installed. That would add a bunch of new files that does not comply with our CS guidelines, ie build will always fail.

    This PR first installs flex globally. Then install all packages to the correct (lower) version. That means no recipes are installed.

    ~~I also use environment variable instad.~~

    opened by Nyholm 9
  • Adding AuthorizationRequestResolveEventInterface

    Adding AuthorizationRequestResolveEventInterface

    Related to #76

    Changes:

    • Adding an interface to our 3 events.
    • Remove return $this;
    • ~~Use EventDispatcherInterface from symfony contracts.~~
    • Using the new syntax for EventDispatcherInterface->dispatch() which have the parameter swapped places.
    opened by Nyholm 9
  • Replace ext timecop with Carbon

    Replace ext timecop with Carbon

    Change to prepare support for php 8 #248

    I had add a delta for token expiration checking because this is not really the purpose of integration/acceptance test to check that but the purpose of unit test. This is "mandatory" because league/oauth2-server use DateTimeImmutable object instead of a clock pattern.

    I think the delta is the best way to handle that because in production case it can be something that can append so not really a point.

    opened by Orkin 8
  • Update README.md to highlight replacement by thephpleague/oauth2-server-bundle

    Update README.md to highlight replacement by thephpleague/oauth2-server-bundle

    Adding useful hints to README.md to guide other devs to find the replacement of this bundle. The configuation oauth2: true in security.yml leads to errors when using Symfony 5.3 in combination with this bundle.

    opened by pixelfantasy 0
  • is this project still maintained ?

    is this project still maintained ?

    This project is very useful and well developped. But there is no release since October 2020 and even if a lot of PR have been done.

    is this project still maintained ?

    opened by sdespont 2
  • sensio/framework-extra-bundle dependencya problem with 3.2.0

    sensio/framework-extra-bundle dependencya problem with 3.2.0

    This commit https://github.com/trikoder/oauth2-bundle/commit/286cab0903029d17898cc617ae88d26f808c3a9e (committed on 5 Feb 2021 ) remove the dependency of sensio/framework-extra-bundle but has never been released.

    Would it be possible to have a new release to avoid conflict in composer due to this dependency please?

    opened by sdespont 0
  • Update project status in README in favor of moving to thephpleague/oauth2-server-bundle

    Update project status in README in favor of moving to thephpleague/oauth2-server-bundle

    Assist other developers in knowing this project's future plans of moving to thephpleague/oauth2-server-bundle. Obviously feel free to update or improve the message.

    opened by dsiemensma-move 0
  • fixing notice error for php 8.1

    fixing notice error for php 8.1

    Return type of Trikoder\Bundle\OAuth2Bundle\League\Entity\Scope::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice.

    opened by kuldippujara 0
  • Password Grant Flow

    Password Grant Flow

    Hi,

    I need to implement the password grant flow between an angular SPA and symfony api back end. My understanding is that I should use the password grant flow. The SPA will serve 3 different brand sites and we will have 3 different OAuth Clients. The first thing I don't get is since the SPA can't contain the client secret which oauth end point I'll be hitting to get the access token.

    Right now we have a two steps registration process and in second step I need to return an access token for the user in order to complete profile. I'm restricting this end point with 'registration' scope and the user will have the role ROLE_USER_INACTIVE + obviously ROLE_OAUTH2_REGISTRATION. So the user can't access anything else. I'm providing the access token like this:

    public function getAccessToken(Request $request, Player $player)
        {
            //Auto wired in constructor
            //Nyholm\Psr7\Factory\Psr17Factory $psrHttpFactory,
            //League\OAuth2\Server\AuthorizationServer $authorizationServer,
            //App\Repository\ClientBrandRepository $clientBrandRepository,
    
            $clientBrand = $this->clientBrandRepository->getOAuthClientByBrand($player->getBrand()->getName());
    
            $request->request->add([
                'grant_type' => 'password',
                'scope' => 'registration',
                'username' => $player->getUsername(),
                'password' => 'password',
                'client_id' => $clientBrand->getClient()->getIdentifier(),
                'client_secret' => $clientBrand->getClient()->getSecret(),
            ]);
    
            $psrRequest = $this->psrHttpFactory->createRequest($request);
            $psr17Factory = new Psr17Factory();
            $serverResponse = $psr17Factory->createResponse();
    
            try {
                $response = $this->authorizationServer->respondToAccessTokenRequest($psrRequest, $serverResponse);
                $responseAsArray = json_decode($response->getBody(), true);
    
                return $responseAsArray;
    
            } catch (OAuthServerException $e) {
                return $e->generateHttpResponse($serverResponse);
            }
        }
    
    

    Here the password sin't taken into account, here is my UserResolveListener

    public function onUserResolve(UserResolveEvent $event): void
        {
            $user = $this->userBrandProvider->loadPlayerByUsernameClient($event->getUsername(), $event->getClient()->getIdentifier());
    
            if (null === $user) {
                return;
            }
    
            if ($user->isActive()) {
                if (!$this->userPasswordEncoder->isPasswordValid($user, $event->getPassword())) {
                    return;
                }
            } else {
                if (!$user->isRegistrationOngoing()) {
                    return;
                }
            }
    
            $event->setUser($user);
        }
    

    Basically in case the user is inactive, I'm checking if the registration is ongoing and without checking the password (since I don't have it) I'm setting the user to the event.

    But I'm not using the 2 oauth end points defined in routes/trikoder_oauth2.yaml

    oauth2_authorize:
        path: /oauth/v2/authorize
        defaults: { _controller: Trikoder\Bundle\OAuth2Bundle\Controller\AuthorizationController::indexAction, _method: GET }
    
    oauth2_token:
        path: /oauth/v2/token
        defaults: { _controller: Trikoder\Bundle\OAuth2Bundle\Controller\TokenController::indexAction, _method: POST }
    

    My question is am I missing something and how I would implement the login? Also since the SPA can't contain the client secret how it would use the refresh token as well?

    Thanks

    opened by cybperic 0
Releases(v3.2.0)
  • v3.2.0(Oct 26, 2020)

    Added

    • Jobs with the prefer-lowest composer flag to CI (#204)
    • On delete CASCADE on authorization code entity client association (#216)
    • Trikoder\Bundle\OAuth2Bundle\Event\AbstractUserResolveEvent abstract class for user resolve events (#221)
    • Add per grant type configuration options (#199)
    • CI testing - Symfony 5.1 (#230)
    • Cleanup command (trikoder:oauth2:clear-revoked-tokens) for revoked tokens (#234)
    • Setter for the secret property of the Client Doctrine entity (#239)

    Changed

    • Pass previous exception toOauth2AuthenticationFailedException exception (#223)
    • Allow PHPUnit 9 (#238)

    Deprecated

    • Legacy service aliases (#203)

    Huge thank you to the following contributors for making this release possible:

    • @franjo-zadelj-trikoder
    • @HypeMC
    • @Orkin
    • @X-Coder264
    • @yceruto
    Source code(tar.gz)
    Source code(zip)
  • v3.1.1(Apr 10, 2020)

  • v3.1.0(Apr 9, 2020)

    Added

    • Ability to revoke credentials (access tokens, authorization codes and refresh tokens) programmatically (fee109d)
    • Support for registering custom grant types (6b37588)

    Fixed

    • Console command trikoder:oauth2:list-clients not being able to list clients without a secret (da38b7a)

    Huge thank you to the following contributors for making this release possible:

    • @dkreuer
    • @toniperic
    • @X-Coder264
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(Feb 26, 2020)

    Added

    • Ability to restrict clients from using the plain challenge method during PKCE (4562a1f)
    • Ability to clear expired authorization codes (91b6447)
    • Support for defining public (non-confidential) clients (8a71f55)
    • The bundle is now compatible with Symfony 5.x (3f36977)

    Changed

    Removed

    • Support for Symfony 3.4, 4.2 and 4.3 (3f36977)

    Huge thank you to the following contributors for making this release possible:

    • @elchris
    • @HypeMC
    • @spideyfusion
    • @X-Coder264
    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Feb 25, 2020)

    Added

    • The bundle is now additionally tested against PHP 7.4 (2b29be3)

    Fixed

    • Authentication provider not being aware of the current firewall context (d349329)
    • Faulty logic when revoking authorization codes (24ad882)

    Huge thank you to the following contributors for making this release possible:

    • @HypeMC
    • @spideyfusion
    • @X-Coder264
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Dec 9, 2019)

    Added

    • Ability to change the scope role prefix using the role_prefix configuration option (b2ee617)
    • Interfaces for converter type service classes (d2caf69)
    • New testing target in Travis CI for Symfony 4.4 (8a44fd4)
    • The bundle is now fully compatible with Symfony Flex (a4ccea1)

    Changed

    • DoctrineBundle version constraint to allow 2.x derived versions (885e398)
    • Explicitly list league/oauth2-server version requirements in the documentation (9dce66a)
    • Reduce distributed package size by excluding files that are used only for development (80b9e41)
    • Simplify AuthorizationRequestResolveEvent class creation (32908c1)

    Fixed

    • Not being able to delete clients that have access/refresh tokens assigned to them (424b770)

    Huge thank you to the following contributors for making this release possible:

    • @Allypost
    • @HypeMC
    • @kennydeckers
    • @Nyholm
    • @rjwebdev
    • @spideyfusion
    • @X-Coder264
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Aug 13, 2019)

  • v2.0.0(Aug 8, 2019)

    Added

    • Ability to specify a Defuse key as the encryption key (d83fefe)
    • Ability to use different PSR-7/17 HTTP transport implementations (4973e1c)
    • Allow configuration of the private key passphrase (f16ec67)
    • Checks if dependent bundles are enabled in the application kernel (38f6641)
    • Console command for clearing expired access and refresh tokens (de3e338)
    • Console commands for client management (2425b3d, 56aafba)
    • Server grant types can now be enabled/disabled through bundle configuration (baffa92)
    • Support for the "authorization_code" server grant type (a61114a)
    • Support for the "implicit" server grant type (91b3d75)
    • Support for Symfony 4.3 (e4cf668)
    • The bundle is now additionally tested against PHP 7.3 (9f5937b)

    Changed

    • Authentication exceptions are now thrown instead of setting the response object (8a505f6)
    • Modernize bundle service definitions (fc1f855, ef2f557)
    • Previously documented client scope inheriting and restricting is now the new default behavior (af9bffc)
    • Relaxed the league/oauth2-server package version constraint to allow non-braking changes (26d9c0b)
    • Use DateTimeInterface instead of DateTime whenever possible (4549252)

    Fixed

    Removed

    • Redundant configuration node options (5fa60ef)
    • Support for Symfony 4.1 (4973e1c)
    • Unsupported HTTP verbs on the /authorize and /token endpoints (51ef5ae)

    Huge thank you to the following contributors for making this release possible:

    • @ajgarlag
    • @alexsegura
    • @Allypost
    • @carlos-ea
    • @cGuille
    • @gschafra
    • @HypeMC
    • @Nyholm
    • @rjwebdev
    • @spideyfusion
    • @X-Coder264
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-beta1(Jun 18, 2019)

  • v1.1.0(Jan 7, 2019)

    Added

    • The bundle is now compatible with Symfony 3.4 (0ba9cb3)

    Changed

    • Bundle dependency requirements are now more relaxed (158d221)
    • Permission checks against private/public keys are no longer enforced (a24415a)

    Fixed

    • Bundle creating a default Doctrine connection if it didn't exist (d4e58a0)
    • Improper class naming (b43be3d)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Nov 28, 2018)

Laravel wrapper around OAuth 1 & OAuth 2 libraries.

Introduction Laravel Socialite provides an expressive, fluent interface to OAuth authentication with Facebook, Twitter, Google, LinkedIn, GitHub, GitL

The Laravel Framework 5.2k Dec 27, 2022
EAuth extension allows to authenticate users by the OpenID, OAuth 1.0 and OAuth 2.0 providers

EAuth extension allows to authenticate users with accounts on other websites. Supported protocols: OpenID, OAuth 1.0 and OAuth 2.0.

Maxim Zemskov 330 Jun 3, 2022
OAuth 1/2 Provider implementations for chillerlan/php-oauth-core. PHP 7.4+

chillerlan/php-oauth-providers Documentation See the wiki for advanced documentation. Requirements PHP 7.4+ a PSR-18 compatible HTTP client library of

chillerlan 4 Dec 2, 2022
OAuth client integration for Symfony. Supports both OAuth1.0a and OAuth2.

HWIOAuthBundle The HWIOAuthBundle adds support for authenticating users via OAuth1.0a or OAuth2 in Symfony. Note: this bundle adds easy way to impleme

Hardware Info 2.2k Dec 30, 2022
EvaOAuth provides a standard interface for OAuth1.0(a) / OAuth2.0 client authorization, it is easy to integrate with any PHP project by very few lines code.

EvaOAuth EvaOAuth provides a standard interface for OAuth1.0 / OAuth2.0 client authorization, it is easy to integrate with any PHP project by very few

AlloVince 256 Nov 16, 2022
EvaOAuth provides a standard interface for OAuth1.0(a) / OAuth2.0 client authorization, it is easy to integrate with any PHP project by very few lines code.

EvaOAuth EvaOAuth provides a standard interface for OAuth1.0 / OAuth2.0 client authorization, it is easy to integrate with any PHP project by very few

AlloVince 261 Jan 17, 2022
Auth is a module for the Yii PHP framework that provides a web user interface for Yii's built-in authorization manager

Auth is a module for the Yii PHP framework that provides a web user interface for Yii's built-in authorization manager (CAuthManager). You can read more about Yii's authorization manager in the framework documentation under Authentication and Authorization.

Christoffer Niska 134 Oct 22, 2022
This is a basic Oauth2 authorization/authentication server implemented using Mezzio.

Mezzio-OAuth2-Authorization-Authentication-Server This is a basic OAuth2 authorization/authentication server implemented using Mezzio. I have found so

null 1 Nov 15, 2022
A spec compliant, secure by default PHP OAuth 2.0 Server

PHP OAuth 2.0 Server league/oauth2-server is a standards compliant implementation of an OAuth 2.0 authorization server written in PHP which makes work

The League of Extraordinary Packages 6.2k Jan 4, 2023
Kaiju is an open source verification bot based on Discord's OAuth written in C# and PHP, with the functionality of being able to integrate the user to a new server in case yours is suspended.

What is Kaiju? Kaiju is an open source verification bot for Discord servers, based on OAuth and with permission for the server owner, to be able to mi

in the space 10 Nov 20, 2022
OAuth server implementation for WP API

WP REST API - OAuth 1.0a Server Connect applications to your WordPress site without ever giving away your password. This plugin uses the OAuth 1.0a pr

WordPress REST API Team 314 Dec 10, 2022
Painless OAuth 2.0 Server for CodeIgniter 4 šŸ”„

Inspired from the Norse mythology, Heimdallr, modernly anglicized as Heimdall is the gatekeeper of Bifrƶst, the rainbow road connecting Midgard, realm

Ezra Lazuardy 37 Nov 12, 2022
Symfony bundle to publish status updates on Facebook, LinkedIn and Twitter.

Upgrading? Check the upgrade guide. What's this? This is a Symfony bundle written in PHP 7.1 that wraps martin-georgiev/social-post - an easy way for

Martin Georgiev 37 Oct 30, 2022
A framework agnostic authentication & authorization system.

Sentinel Sentinel is a PHP 7.3+ framework agnostic fully-featured authentication & authorization system. It also provides additional features such as

Cartalyst 1.4k Dec 30, 2022
Declarative style of authorization and validation in laravel.

Laravel Hey Man Readability Counts. In fact, Readability is the primary value of your code !!! ?? Heyman continues where the other role-permission pac

Iman 860 Jan 1, 2023
Minimalistic token-based authorization for Laravel API endpoints.

Bearer Minimalistic token-based authorization for Laravel API endpoints. Installation You can install the package via Composer: composer require ryang

Ryan Chandler 74 Jun 17, 2022
An authorization library that supports access control models like ACL, RBAC, ABAC in PHP .

PHP-Casbin Documentation | Tutorials | Extensions Breaking News: Laravel-authz is now available, an authorization library for the Laravel framework. P

PHP-Casbin 1.1k Dec 14, 2022
Files Course Laravel Micro Auth and Authorization

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

EspecializaTi 8 Oct 22, 2022