Many thanks for everyone. Very helpful. Yes it works now after I have changed it as you guys suggested.
^(http?|https?|imaps?)://localhost:8080/casldap/.* Now I am able to authenticate successfully but after that it seems to have problem in loading authorisation roles. I would post it separately. Cheers Jay On Tuesday, 23 September 2014 16:27:19 UTC+1, John Gasper wrote: > > Looks like a lot of people weighed in with the same solution. The regex > string must be the problem... :D > > BTW, my second url should have been http://regex101.com/r/xF5yT0/3. > Updated below > > On 9/23/14 8:22 AM, John Gasper wrote: > > Thanks. I think your regex is off. Checkout http://regex101.com/r/xF5yT0/1. > Your pattern doesn't match the whole url, only the beginning. Change the > trailing "*" to ".*" (see http://regex101.com/r/xF5yT0/3 > <http://regex101.com/r/xF5yT0/1>) and the whole string gets matched. > > --- > *John Gasper* > IAM Consultant > Unicon, Inc. > PGP/GPG Key: 0xbafee3ef > > On 9/23/14 8:05 AM, Jay wrote: > > I have 2 different sample applications with below urls which I have > enabled CAS authentication. Those 2 URLs can be accessed only by > authenticated users <intercept-url pattern="/underConstruction**" > access="isAuthenticated()" /> > > > - http://localhost:8080/casldap/underConstruction > - http://localhost:8080/cassimple/underConstruction > > > > > > On Tue, Sep 23, 2014 at 3:24 PM, John Gasper <[email protected] > <javascript:>> wrote: > >> Hi Jay, >> >> What is the url of the application that you are trying to hit? >> >> John >> >> --- >> *John Gasper* >> IAM Consultant >> Unicon, Inc. >> PGP/GPG Key: 0xbafee3ef >> >> On 9/23/14 4:10 AM, Jayakumar Jayaraman wrote: >> >> Hello >> >> I am new to CAS. >> >> I have done the CAS 4.0 setup and I am able to integrate with another >> web application if I used the default cas-server-webapp-4.0.0.war >> >> But when I built it using the maven overlay only CAS works fine >> standalone with URL http://localhost:8080/cas/login. >> >> But once I integrate with my web app, it gives this error ...*"The >> application you attempted to authenticate to is not authorized to use CAS."* >> >> I have registered two services like this, in deployerConfigContext.xml >> I have also attached the full file. >> Not sure what mistake I am making. >> >> <bean class="org.jasig.cas.services.RegexRegisteredService"> >> <property name="id" value="1" /> >> <property name="name" value="cassimple" /> >> <property name="description" value="cassimple application 1" >> /> >> <property name="serviceId" >> value="^(http?|https?|imaps?)://localhost:8080/cassimple/*" /> >> <property name="evaluationOrder" value="10000001" /> >> </bean> >> >> <bean class="org.jasig.cas.services.RegexRegisteredService"> >> <property name="id" value="2" /> >> <property name="name" value="casldap" /> >> <property name="description" value="casldap application 2" /> >> <property name="serviceId" >> value="^(http?|https?|imaps?)://localhost:8080/casldap/*" /> >> <property name="evaluationOrder" value="10000002" /> >> </bean> >> >> >> Thanks >> Jay >> >> >> -- >> You are currently subscribed to [email protected] <javascript:> as: >> [email protected] <javascript:> >> To unsubscribe, change settings or access archives, see >> http://www.ja-sig.org/wiki/display/JSG/cas-user >> >> >> -- >> You are currently subscribed to [email protected] <javascript:> as: >> [email protected] <javascript:> >> To unsubscribe, change settings or access archives, see >> http://www.ja-sig.org/wiki/display/JSG/cas-user >> >> > -- > You are currently subscribed to [email protected] <javascript:> as: > [email protected] <javascript:> > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user > > > > -- > You are currently subscribed to [email protected] <javascript:> as: > [email protected] <javascript:> > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user > > -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
