Renamed crdentials/principals to userName/password

This commit is contained in:
Olivier Brand 2012-01-05 08:26:54 -08:00
parent e96ae91800
commit 36bca7d609
2 changed files with 24 additions and 22 deletions

View File

@ -1,49 +1,51 @@
package com.phonegap; package com.phonegap;
/** /**
* The Class AuthenticationToken defines the principal and credentials to be used for authenticating a web resource * The Class AuthenticationToken defines the userName and password to be used for authenticating a web resource
*/ */
public class AuthenticationToken { public class AuthenticationToken {
private String principal; private String userName;
private String credentials; private String password;
/** /**
* Gets the principal. * Gets the user name.
* *
* @return the principal * @return the user name
*/ */
public String getPrincipal() { public String getUserName() {
return principal; return userName;
} }
/** /**
* Sets the principal. * Sets the user name.
* *
* @param principal * @param userName
* the new principal * the new user name
*/ */
public void setPrincipal(String principal) { public void setUserName(String userName) {
this.principal = principal; this.userName = userName;
} }
/** /**
* Gets the credentials. * Gets the password.
* *
* @return the credentials * @return the password
*/ */
public String getCredentials() { public String getPassword() {
return credentials; return password;
} }
/** /**
* Sets the credentials. * Sets the password.
* *
* @param credentials * @param password
* the new credentials * the new password
*/ */
public void setCredentials(String credentials) { public void setPassword(String password) {
this.credentials = credentials; this.password = password;
} }
} }

View File

@ -1452,7 +1452,7 @@ public class DroidGap extends PhonegapActivity {
AuthenticationToken token = getAuthenticationToken(host,realm); AuthenticationToken token = getAuthenticationToken(host,realm);
if(token != null) { if(token != null) {
handler.proceed(token.getPrincipal(), token.getCredentials()); handler.proceed(token.getUserName(), token.getPassword());
} }
} }