Skip to content

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

@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
f4ee26f
added 10 commits that reference this issue on Mar 23, 2025
5a21ac9
67336d9
c40a1a3
1ba3aa7
c88895f
0ffa806
b44cbb6
3718242
41caa90
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