Skip to content

[All SDKs] OAuth token endpoint should be configurable and/or support oidc discovery #238

Open
1 of 3 issues completed
Open
@le-yams

Description

@le-yams
Contributor

Description

For clients using OAuth2 credentials, the token endpoint is currently hardcoded in all SDKs (with /oauth/token value).
Could it be possible to make it configurable? Or even better support oidc discovery?

I'm willing to contribute if that's something you would be interested in :)

Steps to take

Change the apiTokenIssuer field in the configuration to accept a full URL.
So:

ApiTokenIssuer Endpoint SDK will hit
issuer.fga.example https://issuer.fga.example/oauth/token
https://issuer.fga.example https://issuer.fga.example/oauth/token
https://issuer.fga.example:8080 https://issuer.fga.example:8080/oauth/token
issuer.fga.example/some_endpoint https://issuer.fga.example/some_endpoint
https://issuer.fga.example/some_endpoint https://issuer.fga.example/some_endpoint
https://issuer.fga.example:8080/some_endpoint https://issuer.fga.example:8080/some_endpoint

Of course, we'll need to do some of the validations to ensure e.g. users are passing fields with https or http (and not e.g. ftp) and that the full url is valid

Related Issues

SDKs to be updated

Sub-issues

Sub-issues

1 of 3 Issues completed

Activity

le-yams

le-yams commented on Nov 30, 2023

@le-yams
ContributorAuthor

I opened the PR #240 for the Java SDK. I have prepared all other SDKs (go, js, dotnet and python) but I'll wait your review on this one before submitting them 😃.

added
enhancementNew feature or request
go-sdkAffects the Go SDK
dotnet-sdkAffects the C#/DotNet SDK
js-sdkAffects the JavaScript SDK
python-sdkAffects the Python SDK
java-sdkAffects the Java/Kotlin SDK
on Dec 15, 2023
moved this to In progress in SDKs and Toolingon Jan 22, 2024
moved this from In progress to Ready in SDKs and Toolingon Jan 23, 2024
moved this from Ready to No status in SDKs and Toolingon Feb 9, 2024
moved this to Back-burner in SDKs and Toolingon Feb 9, 2024

16 remaining items

Loading
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

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rhamzeh@danielloader@le-yams@stefan505@manuel-lang

        Issue actions

          [All SDKs] OAuth token endpoint should be configurable and/or support oidc discovery · Issue #238 · openfga/sdk-generator