...
Code Block | ||
---|---|---|
| ||
<bean
id="oauth20WrapperController"
class="org.jasig.cas.support.oauth.web.OAuth20WrapperController"
p:loginUrl="http://mycasserverwithoauthwrapper/cas/login"
p:servicesManager-ref="servicesManager"
p:ticketRegistry-ref="ticketRegistry"
p:timeout="7200" /> |
...
Code Block | ||
---|---|---|
| ||
<bean id="handlerMappingC" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/logoutserviceValidate">logoutController<>serviceValidateController</prop> ............ ............... <prop key="/403.htmlstatistics">passThroughController<>statisticsController</prop> <prop key="/oauth2.0/*">oauth20WrapperController</prop> </props> </property> <property name="alwaysUseFullPath" value="true" /> </bean> |
...
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/loginoauth client service url" /> <property name="theme" value="TheActualServiceName" /> </bean> ... |
...
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" /> <!-- Supports regex patterns by default for service ids --> <property name="serviceId" value="http://mycasserver/loginoauth client service url" /> <property name="clientId" value="client id goes here" /> <property name="clientSecret" value="client secret goes here" /> </bean> ... |
...
CAS 4, the callback authorize service is to be defined via the above specific service in the service registry . (use regexp pattern).
k) OAuthRegisteredCallbackAuthorizeService (org.jasig.cas.support.oauth.services)
CAS 4, same service as above but defined as Ant pattern.