...
It's the url to call to get the profile of the authorized user. Input GET parameter required : access_token. The response is in JSON format with all attributes of the user.
II. How to add OAuth server support in CAS server ?
...
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl"> <property name="registeredServices"> <list> <bean class="org.jasig.cas.services.RegisteredServiceImpl"> <property name="id" value="1" /> <property name="name" value="the_key_for_caswrapper1" /> <property name="description" value="the_secret_for_caswrapper1" /> <property name="serviceId" value="http://mycasserver/login" /> <property name="theme" value="TheActualServiceName" /> </bean> ... |
Starting with CAS 4, this configuration is made more explicit such that specific OAuth Services are now recognized by CAS:
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
<property name="registeredServices">
<list>
<!-- Supports regex patterns by default for service ids -->
<bean class="org.jasig.cas.support.oauth.services.OAuthRegisteredService">
<property name="id" value="1" />
<property name="name" value="serviceName" />
<property name="description" value="Service Description" />
<property name="serviceId" value="http://mycasserver/login" />
<property name="clientId" value="client id goes here" />
<property name="clientSecret" value="client secret goes here" />
</bean>
...
|
Note that there are specific properties, clientId and clientSecret dedicated to OAuth clients for configuration.
3.2) (Optional) CAS OAuth Client using another CAS OAuth Server
...
This controller returns a profile for the authenticated user (identifier + attributes), found with the access token (CAS granting ticket).
i) OAuthRegisteredService (org.jasig.cas.support.oauth.services)
CAS 3, OAuth clients are registered via the above component in the service registry. Allows for options to define service name, client id and secret.
j) OAuthCalllbackAuthorizeService (org.jasig.cas.support.oauth.services)
CAS 4, the callback authorize service is to be defined via the above specific service in the service registry.