-
Notifications
You must be signed in to change notification settings - Fork 444
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
add DynamicTokenProvider. #239
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Vicente Yu <^@^>
Signed-off-by: Vicente.Yu <^@^>
Signed-off-by: Vicente.Yu <^@^>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IgnoreAttribute可以和WDynamicTokenAttribute合并,参考HeaderAttribute
/// </summary> | ||
/// <param name="serviceProvider">服务提供者</param> | ||
/// <returns></returns> | ||
protected abstract Task<TokenResult?> RequestTokenAsync(IServiceProvider serviceProvider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RequestTokenAsync可能需要携带identifier参数
/// <param name="serviceProvider">服务提供者</param> | ||
/// <param name="refresh_token">刷新token</param> | ||
/// <returns></returns> | ||
protected abstract Task<TokenResult?> RefreshTokenAsync(IServiceProvider serviceProvider, string refresh_token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RefreshTokenAsync可能需要携带identifier参数?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RefreshTokenAsync 按理不用,是以token换token。
这个接口的设计,与原体系偏离了,没有能够利用起ITokenProviderFactory的功能。 |
懂了懂了,感谢! |
Signed-off-by: Vicente.Yu <^@^>
Signed-off-by: Vicente.Yu <^@^>
Signed-off-by: Vicente.Yu <^@^>
Signed-off-by: Vicente.Yu <^@^>
Signed-off-by: Vicente.Yu <^@^>
Signed-off-by: Vicente.Yu <^@^>
Signed-off-by: Vicente.Yu <^@^>
使用 MultiUserOAuthTokenAttribute 替代 |
Signed-off-by: Vicente.Yu <^@^>
WebApplication1 模拟客户端,有10个APP,轮流调用API。 |
使用AliasOAuthTokenAttribute来实现。 |
这个功能 还提供吗? 我现在 有需求就是同一个接口, 根据业务需求用不同的token去调用. |
@fengb3 |
有相关文档吗? |
多个应用,共享一套api 的TokenProvider机制。