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

Added optional POST callback #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wolffparkinson
Copy link

  • Added an optional paramater for get_auth_link generator function, to allow response_mode=form_post as an optional query parameter
  • This allows LINE Notify server to directly send POST request to callback URL instead of URL redirection

From API docs:
By assigning "form_post", sends POST request to redirect_uri by form post instead of redirecting
Extended specifications: https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html

We recommend assigning this to prevent code parameter leaks in certain environments

- Added an optional paramater for `get_auth_link` generator  function, to allow `response_mode=form_post` as an optional query parameter
- This allows LINE Notify server to directly send POST request to callback URL instead of URL redirection

From API docs:	
By assigning "form_post", sends POST request to redirect_uri by form post instead of redirecting
Extended specifications: https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html

We recommend assigning this to prevent code parameter leaks in certain environments
@louis70109
Copy link
Owner

Thanks for your contribution :)

Could you add a test case for this change?

It would be helpful for the developer~

(and please check CI 🙏)

@wolffparkinson
Copy link
Author

Surely, it wasn't showing me CI as I am new to GitHub, now it is.
I will look into it, but tbh, I don't have any experience with CI and pytest XD. Still new hehe

@louis70109
Copy link
Owner

Surely, it wasn't showing me CI as I am new to GitHub, now it is.
I will look into it, but tbh, I don't have any experience with CI and pytest XD. Still new hehe

maybe you can copy my test function as new test case~~
it just runs function, something like you test python code at terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants