All Packages Class Hierarchy This Package Previous Next Index
Class jnfs.security.Token
java.lang.Object
|
+----jnfs.security.Token
- public class Token
- extends Object
- implements Serializable
A token, once generated by the server, is passed back by the client
with every request in order to verify that the client has been
authenticated.
- Version:
- $Id: Token.java,v 1.11 1997/05/20 19:16:20 mjr Exp $
- Author:
- Michael John Radwin
-
Token(String, SecureRandom)
- Creates a token with a default number of random bytes.
-
Token(String, SecureRandom, int)
- Creates a token with
length
random bytes.
-
bytes()
- Returns a copy of the random bytes associated with this tokens.
-
equals(Object)
- Tests for equality of Tokens.
-
issuedTimeMillis()
- When this token was issued, according to the server's clock.
-
isValid()
- Indicates whether this token is still valid.
-
user()
- Returns the name of the user associated with this token.
Token
public Token(String user,
SecureRandom rand)
- Creates a token with a default number of random bytes.
- See Also:
- generateToken
Token
public Token(String user,
SecureRandom rand,
int length)
- Creates a token with
length
random bytes.
- See Also:
- generateToken
bytes
public byte[] bytes()
- Returns a copy of the random bytes associated with this tokens.
user
public String user()
- Returns the name of the user associated with this token.
isValid
public boolean isValid()
- Indicates whether this token is still valid. In this implementation,
the token always returns
true
.
issuedTimeMillis
public long issuedTimeMillis()
- When this token was issued, according to the server's clock.
equals
public boolean equals(Object other)
- Tests for equality of Tokens.
- Overrides:
- equals in class Object
All Packages Class Hierarchy This Package Previous Next Index