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

Constructor Index

 o Token(String, SecureRandom)
Creates a token with a default number of random bytes.
 o Token(String, SecureRandom, int)
Creates a token with length random bytes.

Method Index

 o bytes()
Returns a copy of the random bytes associated with this tokens.
 o equals(Object)
Tests for equality of Tokens.
 o issuedTimeMillis()
When this token was issued, according to the server's clock.
 o isValid()
Indicates whether this token is still valid.
 o user()
Returns the name of the user associated with this token.

Constructors

 o Token
 public Token(String user,
              SecureRandom rand)
Creates a token with a default number of random bytes.

See Also:
generateToken
 o Token
 public Token(String user,
              SecureRandom rand,
              int length)
Creates a token with length random bytes.

See Also:
generateToken

Methods

 o bytes
 public byte[] bytes()
Returns a copy of the random bytes associated with this tokens.

 o user
 public String user()
Returns the name of the user associated with this token.

 o isValid
 public boolean isValid()
Indicates whether this token is still valid. In this implementation, the token always returns true.

 o issuedTimeMillis
 public long issuedTimeMillis()
When this token was issued, according to the server's clock.

 o 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