| | |
| | | } |
| | | |
| | | @Override |
| | | public OAuth2AccessTokenDO grantClientCredentials(String clientId, List<String> scopes) { |
| | | // TODO iailab:项目中使用 OAuth2 解决的是三方应用的授权,内部的 SSO 等问题,所以暂时不考虑 client_credentials 这个场景 |
| | | throw new UnsupportedOperationException("暂时不支持 client_credentials 授权模式"); |
| | | public OAuth2AccessTokenDO grantClientCredentials(String username, String clientId, List<String> scopes) { |
| | | AdminUserDO tenantUser = adminAuthService.getTenantUser(username); |
| | | // 创建访问令牌 |
| | | return oauth2TokenService.createAccessToken(tenantUser.getId(), UserTypeEnum.ADMIN.getValue(), clientId, scopes); |
| | | } |
| | | |
| | | @Override |