django-oauth-toolkit icon indicating copy to clipboard operation
django-oauth-toolkit copied to clipboard

Added oauth2_settings.RESOURCE_SERVER_INTROSPECTION_RESPONSE_FIELD setting to let po…

Open fijemax opened this issue 10 months ago • 3 comments

fijemax avatar Oct 21 '23 12:10 fijemax

Codecov Report

Merging #1347 (bef53ce) into master (4c13679) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1347   +/-   ##
=======================================
  Coverage   97.54%   97.54%           
=======================================
  Files          32       32           
  Lines        2120     2120           
=======================================
  Hits         2068     2068           
  Misses         52       52           
Files Coverage Δ
oauth2_provider/oauth2_validators.py 94.09% <100.00%> (ø)
oauth2_provider/settings.py 100.00% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Oct 21 '23 12:10 codecov[bot]

@fijemax, I think I see your need here. The user is being fetched or created here. The current implementation uses username as the key field. Username may not be set as it's an optional in the response and frankly we don't know the required fields on someones usermodel so this approach is a bit naieve.

I think this approach might work for your use case, but at the moment I don't think I have enough context to be confident this is a good fix that will work for the wider community. I'm gonna do some digging around this method so I better understand how it's used. Can you please provide more detail on your use case in your original issue to provide more context?

@n2ygk, do you have thoughts?

dopry avatar Oct 21 '23 16:10 dopry

@dopry @fijemax I have not been following this issue. Isn't getting the sub or other added claims described here? Or here for userinfo.

n2ygk avatar Oct 23 '23 13:10 n2ygk