|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.typekey4j.TypeKey4J
TypeKey4J handles TypeKey authentication in Java
To use:
TypeKey4J typeKey4J = new TypeKey4J();
typeKey4J.setProxyConfiguration(someProxyHost, someProxyPort); // If applicable
typeKey4J.retrieveTypekeyDSAKey();
boolean verified = typeKey4J.verify(version, email, name, nick, ts, sig, token);
| Constructor Summary | |
TypeKey4J()
TypeKey4J constructor |
|
| Method Summary | |
java.util.Date |
getLastKeyRetrieval()
Retrieve the date/time of the last DSA public key retrieval from TypeKey |
void |
retrieveTypekeyDSAKey()
Retrieve the TypeKey DSA public key |
void |
setProxyConfiguration(java.lang.String proxyHost,
int proxyPort)
Set proxy information for use in a firewall environment |
boolean |
verify(java.lang.String version,
java.lang.String email,
java.lang.String name,
java.lang.String nick,
java.lang.String ts,
java.lang.String sig,
java.lang.String token)
Verify TypeKey authentication information |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TypeKey4J()
| Method Detail |
public void setProxyConfiguration(java.lang.String proxyHost,
int proxyPort)
proxyHost - Proxy hostproxyPort - Proxy portpublic void retrieveTypekeyDSAKey()
public java.util.Date getLastKeyRetrieval()
public boolean verify(java.lang.String version,
java.lang.String email,
java.lang.String name,
java.lang.String nick,
java.lang.String ts,
java.lang.String sig,
java.lang.String token)
version - TypeKey version; typically will always be 1.1email - The user's email address. If the user chose not to pass an email address, this field will contain the SHA1 hash [1] of the string "mailto:<email>"name - This field supplies the user's unique login namenick - The user's "display name": the name by which the user wants to be known publiclyts - This is the timestamp when the signature was generated, expressed as seconds since the epoch (1970-01-01 00:00:00 UTC)sig - The DSA signature of the string formed by concatenating the following values, separated by double-colons: <email>::<name>::<nick>::<ts>::<site-token>token - TypeKey token
true if signature verified, false otherwise or if fault occurred
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||