Page 1 of 1

why need to login

Posted: Fri Oct 10, 2008 2:10 am
by mcheung63
Hi all
I have set BasicAuth to false and I already setup the username and password in web.xml.
Why it needs me to login?

thanks
from Peter (cmk128@hotmail.com)

Re: why need to login

Posted: Mon Oct 13, 2008 2:49 pm
by cj91
This requires a code change... If you scroll down in the forum topic list, I posted about this already.


Here is my changes to CredentialManager.java:

Code: Select all

 if (credentials == null) {
            if (ConfigurationProvider.getInstance().isAnonymousOnlyMode()){
               username = ConfigurationProvider.getInstance().getUsername();
               password = ConfigurationProvider.getInstance().getPassword();
            } else
           //BasicAuth mode
            if (ConfigurationProvider.getInstance().isBasicAuth() && this.isBasicAuthentication(request)) {
               UserCredentials basicCredentials = this.getBasicAuthenticationCredentials(request);
               username = basicCredentials.getUsername();
               password = basicCredentials.getPassword();
            } else {
                username = requestHandler.getUsername();
                password = requestHandler.getPassword();
            }