odwyersoftware / azure-ad-verify-token

Verify JWT issued by Azure Active Directory B2C in Python 🐍
Other
23 stars 6 forks source link

Question regarding validating jwt against multiple issuers #4

Closed suzannechang closed 3 years ago

suzannechang commented 3 years ago

Hi,

We have multiple issuers in our sign in sign up flow that are secured with jwt. I tried putting the multiple issuers in an array. But then i got: No connection adapters were found for "[['https://

Could you assist?

Regards. Suzanne

richardARPANET commented 3 years ago

That's not yet supported. Would this mean you would want to call verify_jwt(issuers=list) and have it return a list of dicts? rather than dict as it is currently?

suzannechang commented 3 years ago

Hi Richard,

Something like this?

azure_ad_app_id = 'client_id' azure_ad_issuer = ['issuerurl','issuerurl','issuerurl'] azure_ad_jwks_uri = ['jwksurl','jwksurl','jwksurl']

payload = verify_jwt( token='jwttoken ', valid_audiences=[azure_ad_app_id], issuer=azure_ad_issuer, jwks_uri=azure_ad_jwks_uri, )

print(payload)

richardARPANET commented 3 years ago

Could you not just call verify_jwt() multiple times in a for loop?

suzannechang commented 3 years ago

Will do