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;
/**
* 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 {
private String principal;
private String credentials;
private String userName;
private String password;
/**
* Gets the principal.
* Gets the user name.
*
* @return the principal
* @return the user name
*/
public String getPrincipal() {
return principal;
public String getUserName() {
return userName;
}
/**
* Sets the principal.
* Sets the user name.
*
* @param principal
* the new principal
* @param userName
* the new user name
*/
public void setPrincipal(String principal) {
this.principal = principal;
public void setUserName(String userName) {
this.userName = userName;
}
/**
* Gets the credentials.
* Gets the password.
*
* @return the credentials
* @return the password
*/
public String getCredentials() {
return credentials;
public String getPassword() {
return password;
}
/**
* Sets the credentials.
* Sets the password.
*
* @param credentials
* the new credentials
* @param password
* the new password
*/
public void setCredentials(String credentials) {
this.credentials = credentials;
public void setPassword(String password) {
this.password = password;
}
}

View File

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