Hi,
I am using CAS Apereo version 6.1.7 and I want to user CAS server as
Authorization server.
Here is my service registry:
Step 1:
Register service
cat /etc/cas/services-repo/MyOAuthservice-100.json
{
"@class" : "org.apereo.cas.support.oauth.services.OAuthRegisteredService",
"clientId": "clientid",
"clientSecret": "clientSecret",
"serviceId" : "^https://hello.*",
"name" : "MyOAuthservice",
"id" : 100,
"supportedGrantTypes": [ "java.util.HashSet", [ "authorization_code" ] ],
"supportedResponseTypes": [ "java.util.HashSet", [ "code" ] ]
}
Step 2:
I request Authorization code like this:
Request
curl
https://ssostandalone.vdc2.com.vn:8443/cas/oauth2.0/authorize?response_type=code&client_id=clientid&redirect_uri=https://hello.*
Response
[1] 14428
[2] 14429
[image: author1.PNG]
Step 3:
Request access token
root@ssostandalone:~# curl
https://ssostandalone.vdc2.com.vn:8443/cas/oauth2.0/accessToken?grant_type=authorization_code&client_id=clientid&client_secret=clientSecret&code=14429&redirect_uri=https://hello.*
Response
{"@class":"java.util.LinkedHashMap","timestamp":["java.util.Date",1600072348620],"status":401,"error":"Unauthorized","message":"No
message available","path":"/cas/oauth2.0/accessToken"}
I don't know what is wrong.
Thank you in advance.
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/8e2bab2f-0dfc-452d-97a4-a6023259ba34n%40apereo.org.