Coder Social home page Coder Social logo

JWT authentication issue about authlib HOT 3 OPEN

jmrbcu avatar jmrbcu commented on June 1, 2024
JWT authentication issue

from authlib.

Comments (3)

jlambright avatar jlambright commented on June 1, 2024 1

I'm in the same boat, and it seems like the AssertionClient and AsyncAssertionClient don't take a signed jwt or even take in the private key. How is this supposed to work?

https://github.com/lepture/authlib/blob/master/authlib/integrations/httpx_client/assertion_client.py

from authlib.

jlambright avatar jlambright commented on June 1, 2024 1

We were able to track down some implied keywords through reading the source code, but it didn't work.

self.assertion_client = AsyncAssertionClient(
                token_endpoint=f'https://{REDACTED_VARIABLE_1}/oauth/v2/token',
                subject=REDACTED_VARIABLE_2,
                issuer=REDACTED_VARIABLE_2,
                audience=f'https://{REDACTED_VARIABLE_1}',
                grant_type='urn:ietf:params:oauth:grant-type:jwt-bearer',
                token_placement='body',
                claims=self.scopes,
                header=REDACTED_VARIABLE_3,
                key=REDACTED_VARIABLE_4

            )

from authlib.

jmrbcu avatar jmrbcu commented on June 1, 2024

This is the only way I've been able to do it:

session = OAuth2Session(self.client_id, self.client_secret)
session.fetch_token(urljoin(self.base_url, TOKEN_ENDPOINT), grant_type="urn:ietf:params:oauth:grant-type:jwt-bearer", assertion=jwt)

from authlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.