ajanta.util
Class AuthenticationTicket

java.lang.Object
  |
  +--ajanta.util.AuthenticationTicket
All Implemented Interfaces:
java.io.Serializable

public class AuthenticationTicket
extends java.lang.Object
implements java.io.Serializable

The AuthenticationTicket class represents a type of capability required by clients to invoke services which require authentication. It contains the ticket holder's name (URN) along with its signature on a nonce, i.e. a challenge which was previously sent to it by the service. It can optionally contain anothe nonce of its own, which challenges the service to prove its identity.

See Also:
Serialized Form

Field Summary
 int challenge
           
 ajanta.util.ContextObject context
           
 byte[] signature
           
 ajanta.naming.URN signer
           
 
Constructor Summary
AuthenticationTicket(ajanta.util.AuthenticationTicket t, ajanta.naming.URN signer, java.security.PrivateKey key)
          This constructor takes as parameter a AuthenticationTicket object which has been sent to the client by a server, and extracts the nonce contained in it.
AuthenticationTicket(ajanta.naming.URN u, byte[] s, int n)
           
 
Method Summary
 void setContext(ajanta.util.ContextObject context)
           
 java.lang.String toString()
          Converts the AuthenticationTicket object to a String representation suitable for printing onto the screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

signer

public ajanta.naming.URN signer

signature

public byte[] signature

challenge

public int challenge

context

public ajanta.util.ContextObject context
Constructor Detail

AuthenticationTicket

public AuthenticationTicket(ajanta.naming.URN u,
                            byte[] s,
                            int n)

AuthenticationTicket

public AuthenticationTicket(ajanta.util.AuthenticationTicket t,
                            ajanta.naming.URN signer,
                            java.security.PrivateKey key)
                     throws java.security.NoSuchAlgorithmException,
                            java.security.InvalidKeyException,
                            java.security.SignatureException
This constructor takes as parameter a AuthenticationTicket object which has been sent to the client by a server, and extracts the nonce contained in it. This nonce is signed using the given private key, and stored in this new AuthenticationTicket object. Also, the nonce contained in the original AuthenticationTicket is then incremented, so that the AuthenticationTicket can be reused for future interactions with the same service.

Parameters:
t - The original AuthenticationTicket containing the nonce to be signed.
signer - The name of the client, to be inserted into the AuthenticationTicket being constructed here.
key - The private key to be used for signing the nonce.
Method Detail

toString

public java.lang.String toString()
Converts the AuthenticationTicket object to a String representation suitable for printing onto the screen.

Overrides:
toString in class java.lang.Object

setContext

public void setContext(ajanta.util.ContextObject context)