fix: oauth2文档
This commit is contained in:
@@ -60,3 +60,24 @@ tenant-id: {{adminTenantId}}
|
||||
POST {{baseUrl}}/system/oauth2/check-token?token=620d307c5b4148df8a98dd6c6c547106
|
||||
Authorization: Basic ZGVmYXVsdDphZG1pbjEyMw==
|
||||
tenant-id: {{adminTenantId}}
|
||||
|
||||
|
||||
|
||||
@host = http://localhost:48080
|
||||
@clientId = huachuang-acs
|
||||
@clientSecret = 1001open
|
||||
|
||||
### 1、客户端模式 client_credentials(你最开始curl对应的请求)
|
||||
POST http://localhost:48080/system/oauth2/token
|
||||
Authorization: Bearer 32a8c752af4947d392809f954e32fadf
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
|
||||
###
|
||||
POST http://localhost:48080/system/oauth2/token
|
||||
Authorization: Basic default admin123
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
grant_type = client_credentials
|
||||
|
||||
###
|
||||
@@ -32,6 +32,8 @@ public class SecurityConfiguration {
|
||||
.requestMatchers("/actuator/**").permitAll();
|
||||
// RPC 服务的安全配置
|
||||
registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
|
||||
// OAuth2 开放接口,无需登录即可访问
|
||||
registry.requestMatchers("/admin-api/system/oauth2/**").permitAll();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user