diff --git a/src/main/java/cc/wdcy/domain/dto/OauthClientDetailsDto.java b/src/main/java/cc/wdcy/domain/dto/OauthClientDetailsDto.java
index 7d3b84b..1815032 100644
--- a/src/main/java/cc/wdcy/domain/dto/OauthClientDetailsDto.java
+++ b/src/main/java/cc/wdcy/domain/dto/OauthClientDetailsDto.java
@@ -107,6 +107,14 @@ public class OauthClientDetailsDto implements Serializable {
return scope;
}
+
+ public String getScopeWithBlank() {
+ if (scope != null && scope.contains(",")) {
+ return scope.replaceAll(",", " ");
+ }
+ return scope;
+ }
+
public void setScope(String scope) {
this.scope = scope;
}
diff --git a/src/main/webapp/WEB-INF/jsp/clientdetails/register_client.jsp b/src/main/webapp/WEB-INF/jsp/clientdetails/register_client.jsp
index 53f3228..949f15e 100644
--- a/src/main/webapp/WEB-INF/jsp/clientdetails/register_client.jsp
+++ b/src/main/webapp/WEB-INF/jsp/clientdetails/register_client.jsp
@@ -73,8 +73,7 @@
scope必须选择
diff --git a/src/main/webapp/WEB-INF/jsp/clientdetails/test_client.jsp b/src/main/webapp/WEB-INF/jsp/clientdetails/test_client.jsp index 9e030ba..2aadfa1 100644 --- a/src/main/webapp/WEB-INF/jsp/clientdetails/test_client.jsp +++ b/src/main/webapp/WEB-INF/jsp/clientdetails/test_client.jsp @@ -41,18 +41,25 @@ /oauth/authorize?client_id={{clientId}}&redirect_uri={{redirectUri}}&response_type=code&scope={{scope}} + GET
- 用 'code' 换取 'access_token'
-
- 输入第一步获取的code:
-
- /oauth/token?client_id={{clientId}}&client_secret={{clientSecret}}&grant_type=authorization_code&code={{code}}&redirect_uri={{redirectUri}}
-
用 'code' 换取 'access_token'
+ 点击链接地址即可测试
- + +输入refresh_token 后点击链接地址.
refresh_token: - +