0
votes

These are the steps I followed.

  1. Created new Application from GAE console with custom domain authentication option. Gave my domain name.

  2. Registered my domain with Google Apps for Work. Enable App Engine Service for my GAE Application.

  3. added the following code to the web.xml

    <security-constraint>
     <web-resource-collection>
         <web-resource-name>all</web-resource-name>
         <url-pattern>*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>*</role-name>
    </auth-constraint>
    

  4. tried to open the app with normal gmail account. It is getting redirected to login page. it works fine, upto here.

  5. Here comes the problem, I tried to login with my domain account it is showing an error "Too many redirects".

I tried clearing the cookies and made sure only one account is logged in at time.

Please help.

1
Please change <url-pattern> to <url-pattern>/*</url-pattern>. Alternatively you can use app.yaml for Java apps too as it's easier to configure. Unless your app needs to be portable to other Java app servers. - Nikita Uchaev
its working working fine with /*. thanks Nikita - Chandan Reddy
Please let me know how to use app.yaml for java apps in Eclipse IDE. - Chandan Reddy

1 Answers

0
votes

Please change to /*. Alternatively you can use app.yaml for Java apps too as it's easier to configure (not sure it can be used with Eclipse). Unless your app needs to be portable to other Java app servers.