From 36bca7d6094bc1d7c9efa37c377f1f760b617407 Mon Sep 17 00:00:00 2001 From: Olivier Brand Date: Thu, 5 Jan 2012 08:26:54 -0800 Subject: [PATCH] Renamed crdentials/principals to userName/password --- .../src/com/phonegap/AuthenticationToken.java | 44 ++++++++++--------- framework/src/com/phonegap/DroidGap.java | 2 +- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/framework/src/com/phonegap/AuthenticationToken.java b/framework/src/com/phonegap/AuthenticationToken.java index a01acf1a..9b759aad 100644 --- a/framework/src/com/phonegap/AuthenticationToken.java +++ b/framework/src/com/phonegap/AuthenticationToken.java @@ -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; } + + } diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index 6c13f11d..378f4f44 100755 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -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()); } }