|
@@ -21,14 +21,10 @@ public class AuthenticationDetails implements Serializable {
|
|
* @param context that the authentication request is initiated from
|
|
* @param context that the authentication request is initiated from
|
|
*/
|
|
*/
|
|
public AuthenticationDetails(Object context) {
|
|
public AuthenticationDetails(Object context) {
|
|
- this.context = context==null?"":context.toString();
|
|
|
|
|
|
+ this.context = context == null ? "" : context.toString();
|
|
doPopulateAdditionalInformation(context);
|
|
doPopulateAdditionalInformation(context);
|
|
}
|
|
}
|
|
|
|
|
|
- protected AuthenticationDetails() {
|
|
|
|
- throw new IllegalArgumentException("Cannot use default constructor");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
//~ Methods ========================================================================================================
|
|
//~ Methods ========================================================================================================
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -42,20 +38,11 @@ public class AuthenticationDetails implements Serializable {
|
|
if (obj instanceof AuthenticationDetails) {
|
|
if (obj instanceof AuthenticationDetails) {
|
|
AuthenticationDetails rhs = (AuthenticationDetails) obj;
|
|
AuthenticationDetails rhs = (AuthenticationDetails) obj;
|
|
|
|
|
|
- if ((context == null) && (rhs.getContext() != null)) {
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if ((context != null) && (rhs.getContext() == null)) {
|
|
|
|
|
|
+ // this.context cannot be null
|
|
|
|
+ if (!context.equals(rhs.getContext())) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- if (context != null) {
|
|
|
|
- if (!context.equals(rhs.getContext())) {
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -65,7 +52,7 @@ public class AuthenticationDetails implements Serializable {
|
|
/**
|
|
/**
|
|
* Indicates the context.
|
|
* Indicates the context.
|
|
*
|
|
*
|
|
- * @return the address
|
|
|
|
|
|
+ * @return the context
|
|
*/
|
|
*/
|
|
public String getContext() {
|
|
public String getContext() {
|
|
return context;
|
|
return context;
|
|
@@ -75,7 +62,7 @@ public class AuthenticationDetails implements Serializable {
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
sb.append(super.toString() + ": ");
|
|
sb.append(super.toString() + ": ");
|
|
sb.append("Context: " + this.getContext());
|
|
sb.append("Context: " + this.getContext());
|
|
-
|
|
|
|
|
|
+
|
|
return sb.toString();
|
|
return sb.toString();
|
|
}
|
|
}
|
|
}
|
|
}
|