In my build.gradle in I'm adding the extra dependencies:

compile 
"org.apereo.cas:cas-server-support-oauth-webflow:${project.'cas.version'}"
compile 
"org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"


Then in the /etc/cas/services directory I have an oauth-10001.json:

{
 "@class" : "org.apereo.cas.support.oauth.services.OAuthRegisteredService",
 "clientId": "oauthclient",
 "clientSecret": "secret",
 "generateRefreshToken" : true,
 "jsonFormat" : true,
 "supported_grants" : ["password", "refresh_token"],
 "name" : "OAuthTest",
 "id" : 1001,
 "evaluationOrder" : 1
}

When I make the following curl request I get the log output from above:

curl -X POST \
  https://localhost:8443/cas/oauth2.0/accessToken \
  -H 'Cache-Control: no-cache' \
  -H 'content-type: multipart/form-data; 
boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F grant_type=password \
  -F client_id=oauthclient \
  -F username=john \
  -F password=password


-- 
- 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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/0bce68c2-cdfd-4fef-bc0e-4a6136c82965%40apereo.org.

Reply via email to