-
Notifications
You must be signed in to change notification settings - Fork 17
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
Is this library applicable for use with openid-connect providers other than okta? #38
Comments
@evgenyfadeev This library designed to be used with Okta, thus some features (for example, get jwk for verifying signature) may not work with other oidc providers (the only working case - URI for jwk is being constructed in the same way). |
Thanks! Perhaps you could set the |
That doesn't align with our design. On the other hand you can inherit and override anything. |
This worked for me - a subclass of Later to validate the tokens I called the Btw, not sure why you're not relying on the discovery data for the jwks_uri instead of making assumptions about this url.
|
@evgenyfadeev I'm glad that you've found a solution. Do you mean an additional network call by "discovery data for the jwks_uri"? In this case, we don't need unnecessary network calls: this jwks uri for Okta's orgs has been designed in that way and hasn't been changed for years.
All of these steps are defined within from okta_jwt_verifier import JWTUtils
def verify_access_token(token, jwk):
headers, claims, signing_input, signature = JWTUtils.parse_token(token)
JWTUtils.verify_claims(claims, claims_to_verify=['iss', 'aud', 'exp'])
JWTUtils.verify_signature(token, jwk) |
@ALL can we use this library in flask based web application synchronously since most methods are asynchronous in my case i need verify signature each and every call but my public key is available in remote server.
|
@kadhir-p44 There are few options:
|
@serhiibunaik my concern is every request i need call asyncio.run () eventually it create another thread and i need to wait for result and it cause slow down my service isn't it? i expect something like java library meanwhile i am getting following error on python 3.8 and ubuntu 20.04 okta_jwt_verifier.exceptions.JWTValidationException: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain;charset=utf-8', url=URL('https://****/oauth2/v1/keys') |
Regarding your error you are receiving. Can you run:
And let us know what is returned? If the above returns an error still, could you try swapping the |
Just a question - as is the title. I'm looking for a generic implementation of openid-connect. Can the token verifier be configured for use with other oidc providers?
Thanks!
The text was updated successfully, but these errors were encountered: