Skip to content

GrantConfigurator should accept League\OAuth2\Server\Grant\GrantTypeInterface #225

Open
@TLG-Gildas

Description

@TLG-Gildas

GrantConfigurator only accepts custom grants implementing the League\Bundle\OAuth2ServerBundle\AuthorizationServer\GrantTypeInterface interface. However, if we want to use a custom grant from a library designed for league/oauth2-server and not for league/oauth2-server-bundle, we must create a new class inheriting from the library's grant in order to add the bundle interface.

It would be desirable for GrantConfigurator to also accept the basic league/oauth2-server interface.
In this case, to configure the access token TTL, I imagine it would be possible to use an attribute associated with the league.oauth2_server.authorization_server.grant tag.

What do you think about this?

Activity

chalasr

chalasr commented on Mar 22, 2025

@chalasr
Member

Bundles should contain as less logic as possible 👍 If one can come up with something that allows removing this child interface while keeping the same level of DX and design, I'd be happy.

added a commit that references this issue on Mar 23, 2025

fix: thephpleague#225: GrantConfigurator should accept League\OAuth2\…

f4ee26f
added 10 commits that reference this issue on Mar 23, 2025

fix: thephpleague#225: GrantConfigurator should accept League\OAuth2\…

5a21ac9

fix: thephpleague#225: coding standards

67336d9

fix: thephpleague#225: update documentation to add usage of Autoconfi…

c40a1a3

fix: thephpleague#225: register for autoconfiguration of League\OAuth…

1ba3aa7

fix: thephpleague#225: GrantConfigurator should accept League\OAuth2\…

c88895f

fix: thephpleague#225: coding standards

0ffa806

fix: thephpleague#225: update documentation to add usage of Autoconfi…

b44cbb6

fix: thephpleague#225: register for autoconfiguration of League\OAuth…

3718242

fix: thephpleague#225: coding standard & stan

41caa90

fix: thephpleague#225: revert autoconfiguration of League\OAuth2\Serv…

0975ab8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @chalasr@TLG-Gildas

      Issue actions

        GrantConfigurator should accept League\OAuth2\Server\Grant\GrantTypeInterface · Issue #225 · thephpleague/oauth2-server-bundle