Skip to content

Modify the enum as an abstract type, allowing custom implementations.#858

Closed
zawn wants to merge 0 commit into
scribejava:masterfrom
zawn:master
Closed

Modify the enum as an abstract type, allowing custom implementations.#858
zawn wants to merge 0 commit into
scribejava:masterfrom
zawn:master

Conversation

@zawn

@zawn zawn commented Jun 26, 2018

Copy link
Copy Markdown
Contributor

Modify the enum type to be an abstract type to allow custom implementations
For example, WeChat's OAuth2.0 client authentication parameter names are appid and secret

@kullfar

kullfar commented Jun 26, 2018

Copy link
Copy Markdown
Member

are such variants bad:
https://github.com/scribejava/scribejava/pull/821/files
#739
As far as I remember, they was ok with enum

@zawn

zawn commented Jun 27, 2018

Copy link
Copy Markdown
Contributor Author

This implementation overrides the createAccessTokenRequest method of OAuth20Service and accomplishes similar functions 。
image
image
image

This is not necessary. All we have to do is add a custom client authentication method. This violates the original intention of the ClientAuthenticationType design.

@zawn

zawn commented Jun 27, 2018

Copy link
Copy Markdown
Contributor Author

Of course, no matter how wechat is implemented, our focus is on https://tools.ietf.org/html/rfc6749#section-2.3.2

image
We should provide a possible way for users to implement

@kullfar

kullfar commented Jun 27, 2018

Copy link
Copy Markdown
Member

It does make sense. Thank for pointing to this. I need some time to think about this.

@zawn

zawn commented Jun 29, 2018

Copy link
Copy Markdown
Contributor Author

This is only a minor change and will not affect other existing classes.
you can accept the pull request without additional burden

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