|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.b2b.server.Credential
public class Credential
This class represents a generic "thing" which is used for validation. Currently the only two types of Credentials are passwords and digital certificates.
Credential
Field Summary | |
---|---|
static int |
CERTIFICATE
Typecode for digital certificates. |
static int |
PASSWORD
Typecode for passwords. |
static int |
UNKNOWN
Typecode for unknown credentials. |
Constructor Summary | |
---|---|
Credential()
Creates a new credential. |
|
Credential(int type,
java.lang.Object cred)
Creates a new credential with specified type and value. |
Method Summary | |
---|---|
boolean |
check(java.lang.Object o)
Determines if the supplied value matches this one. |
boolean |
check(java.lang.String pass)
Determines if the supplied password matches this one. |
boolean |
equals(Credential c)
Determines if two credentials are equal. |
int |
getType()
Returns the type of this credential. |
java.lang.String |
getTypeString()
Returns the type of this credential as a string. |
static java.lang.String |
getTypeString(int type)
Returns the string name of the supplied type code. |
java.lang.Object |
getValue()
Returns the value of this credential. |
void |
setType(int credType)
Sets the type of this credential. |
void |
setValue(java.lang.Object cred)
Sets the value of this credential. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UNKNOWN
public static final int PASSWORD
public static final int CERTIFICATE
Constructor Detail |
---|
public Credential()
public Credential(int type, java.lang.Object cred)
type
- The type code (see above for the codes).cred
- The value of the credential.Method Detail |
---|
public void setType(int credType)
credType
- The typecode for this credential.public int getType()
public java.lang.String getTypeString()
public static java.lang.String getTypeString(int type)
type
- the type code.
public void setValue(java.lang.Object cred)
cred
- The new value of the credential.public java.lang.Object getValue()
public boolean equals(Credential c)
public boolean check(java.lang.String pass)
pass
- Guess for the password.
public boolean check(java.lang.Object o)
equals
message of the objects in
question.
o
- Guess for the value of this credential.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |