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

Allow Credentials in POST #24

Merged
merged 1 commit into from
Mar 2, 2021
Merged

Conversation

danygielow
Copy link
Collaborator

client_id and client_secret can also be given via POST data. So added client_id and client_secret to Post namedtuple and trying to retrieve them via POST first. Auth Header if they were not found.

https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/

@aliev
Copy link
Owner

aliev commented Mar 1, 2021

@danygielow thank you for another great PR! I will take a look this evening, we have small issues in typing: https://github.com/aliev/aioauth/pull/24/checks?check_run_id=2001875113

/home/runner/work/aioauth/aioauth/src/aioauth/grant_type.py
  47:32 - error: Argument of type "str | None" cannot be assigned to parameter "client_id" of type "str" in function "get_client"
    Type "str | None" cannot be assigned to type "str"
      Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
1 error, 0 warnings, 0 infos 
Completed in 1.629sec

@synchronizing
Copy link
Collaborator

Seems good with me.

Note on RFC6749 Section 3.2, Token Endpoint:

The client MUST use the HTTP "POST" method when making access token requests.

@synchronizing synchronizing added the enhancement New feature or request label Mar 1, 2021
@codecov-io
Copy link

Codecov Report

Merging #24 (4049f5a) into master (0d790df) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
+ Coverage   99.26%   99.27%   +0.01%     
==========================================
  Files          15       15              
  Lines         541      549       +8     
  Branches       55       56       +1     
==========================================
+ Hits          537      545       +8     
  Misses          3        3              
  Partials        1        1              
Impacted Files Coverage Δ
src/aioauth/grant_type.py 100.00% <100.00%> (ø)
src/aioauth/requests.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d790df...4049f5a. Read the comment docs.

@synchronizing
Copy link
Collaborator

All seems resolved. @aliev Everything looks good to me. 👍🏼

@aliev
Copy link
Owner

aliev commented Mar 2, 2021

for me looks great as well :) @danygielow great job thank you! approved

@aliev aliev merged commit 188699e into aliev:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants