Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic token verifier for handling access_tokens #618

Open
5 tasks done
wontonst opened this issue Apr 15, 2024 · 1 comment
Open
5 tasks done

Generic token verifier for handling access_tokens #618

wontonst opened this issue Apr 15, 2024 · 1 comment
Labels
feature request A feature has been asked for or suggested by the community

Comments

@wontonst
Copy link

wontonst commented Apr 15, 2024

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

See the ask in #453

I want to use this SDK for verifying the access_token on the resource server.

Describe the ideal solution

The PHP SDK has this solution auth0/auth0-PHP#428
I think we can do something similar here.

Alternatives and current workarounds

I am doing

class AccessTokenVerifier(TokenVerifier):
    """
    Disgusting hack to get TokenVerifier to work. TokenVerifier is made for the id_token and auth0
    does not give us an access_token verifier. Proper handling of azp differs across id_token and
    access_token, hence requiring this hack where we force the azp to the app_identifier.
    https://github.com/auth0/ruby-auth0/issues/363
    """
    def _verify_payload(self, *args, **kwargs):
        args[0]['azp'] = AUTH0_AUDIENCE
        super()._verify_payload(*args, **kwargs)

Additional context

No response

@wontonst wontonst added the feature request A feature has been asked for or suggested by the community label Apr 15, 2024
@ayharano
Copy link

While investigating issues related to an Auth0 access token using this package, I came across a StackOverflow answer from 2016 that may be relevant.

This answer led me to a discussion on the OIDC WG, where there appears to have been some changes regarding the handling of the azp claim.

I'm unsure of the extent to which this impacts the current feature request, but I thought it might be useful to bring this to attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

2 participants