Jay, Your regular expression patterns are not what you want:
pattern: ^(http?|https?|imaps?)://localhost:8080/cassimple/* example matches: http://localhost:8080/cassimple http://localhost:8080/cassimple/ http://localhost:8080/cassimple// http://localhost:8080/cassimple/// ... What you probably want: pattern: ^(https?|imaps?)://localhost:8080/cassimple/.* example matches: http://localhost:8080/cassimple/underConstruction?foo=extra_param Thanks, Carl Waldbieser Systems Programmer Lafayette College ----- Original Message ----- From: "Jay" <[email protected]> To: [email protected] Sent: Tuesday, September 23, 2014 11:05:32 AM Subject: Re: [cas-user] The application you attempted to authenticate to is not authorized to use CAS. 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]> 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] as: > [email protected] > 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 > > -- 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 -- 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
