Skip to content

Commit 8712276

Browse files
committed
增加接口实现序列化
1 parent 9b4d1f7 commit 8712276

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

api-boot-project/api-boot-plugins/api-boot-plugin-oauth/src/main/java/org/minbox/framework/api/boot/plugin/oauth/ApiBootAuthorizationServerConfiguration.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,21 @@ private List<TokenGranter> getDefaultTokenGranters() {
177177
OAuth2RequestFactory requestFactory = requestFactory();
178178

179179
List<TokenGranter> tokenGranters = new ArrayList<TokenGranter>();
180+
// code
180181
tokenGranters.add(new AuthorizationCodeTokenGranter(tokenServices, authorizationCodeServices, clientDetails,
181182
requestFactory));
183+
184+
// refresh token
182185
tokenGranters.add(new RefreshTokenGranter(tokenServices, clientDetails, requestFactory));
186+
187+
// implicit
183188
ImplicitTokenGranter implicit = new ImplicitTokenGranter(tokenServices, clientDetails, requestFactory);
184189
tokenGranters.add(implicit);
190+
191+
// client
185192
tokenGranters.add(new ClientCredentialsTokenGranter(tokenServices, clientDetails, requestFactory));
193+
194+
// password
186195
if (authenticationManager != null) {
187196
tokenGranters.add(new ResourceOwnerPasswordTokenGranter(authenticationManager, tokenServices,
188197
clientDetails, requestFactory));

api-boot-project/api-boot-plugins/api-boot-plugin-oauth/src/main/java/org/minbox/framework/api/boot/plugin/oauth/grant/ApiBootOauthTokenGranter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.minbox.framework.api.boot.plugin.oauth.exception.ApiBootTokenException;
2121
import org.springframework.security.core.userdetails.UserDetails;
2222

23+
import java.io.Serializable;
2324
import java.util.Map;
2425

2526
/**
@@ -33,7 +34,7 @@
3334
* Gitee:https://gitee.com/hengboy
3435
* GitHub:https://github.com/hengboy
3536
*/
36-
public interface ApiBootOauthTokenGranter {
37+
public interface ApiBootOauthTokenGranter extends Serializable {
3738
/**
3839
* oauth2 grant type for ApiBoot
3940
*

api-boot-project/api-boot-plugins/api-boot-plugin-security/src/main/java/org/minbox/framework/api/boot/plugin/security/delegate/ApiBootStoreDelegate.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import org.springframework.security.core.userdetails.UserDetails;
2020
import org.springframework.security.core.userdetails.UsernameNotFoundException;
2121

22+
import java.io.Serializable;
23+
2224
/**
2325
* ApiBoot的数据存储委托接口
2426
*
@@ -30,7 +32,7 @@
3032
* Gitee:https://gitee.com/hengboy
3133
* GitHub:https://github.com/hengboy
3234
*/
33-
public interface ApiBootStoreDelegate {
35+
public interface ApiBootStoreDelegate extends Serializable {
3436
/**
3537
* 根据用户名查询用户信息
3638
*

0 commit comments

Comments
 (0)