diff --git a/others/API/SOS_API-0.5.html b/others/API/SOS_API-0.5.html index ade15a9..5944021 100644 --- a/others/API/SOS_API-0.5.html +++ b/others/API/SOS_API-0.5.html @@ -378,7 +378,11 @@ 请求示例:

- http://localhost:8080/spring-oauth-server/oauth/token?client_id=test1234&client_secret=test1234&grant_type=client_credentials&scope=read + {"client_id":"test1234","client_secret":"test1234","grant_type":"password","scope":"read","username":"mobile","password":"mobile"} +

+ +

+ {"client_id":"test1234","client_secret":"test1234","grant_type":"password","scope":"read"}

@@ -391,7 +395,7 @@

正常 [200]
- {"access_token":"e5ea7620-5459-4d53-a7a0-6888bbb76f62","token_type":"bearer","expires_in":43199,"scope":"read"} + {"access_token":"e2996930-8398-44fd-8de5-7d1b1624ced7","token_type":"bearer","refresh_token":"2b2de701-53e7-4b57-8301-e4a06ee49698","expires_in":43008,"scope":"read"}

@@ -399,7 +403,7 @@

异常 [401]
- <oauth><error_description>Bad client credentials</error_description><error>invalid_client</error></oauth> + {"error":"invalid_grant","error_description":"Bad credentials"}

diff --git a/src/main/resources/spring/security.xml b/src/main/resources/spring/security.xml index 7f245ad..5d1d28e 100644 --- a/src/main/resources/spring/security.xml +++ b/src/main/resources/spring/security.xml @@ -11,7 +11,8 @@ - + +