gnu.crypto.sasl.srp

Class ServerStore

public class ServerStore extends Object

The server-side implementation of the SRP security context store.

Version: $Revision: 1.4 $

Method Summary
voidcacheSession(int ttl, SecurityContext ctx)

Records a mapping between a session identifier and the Security Context of the designated SRP server mechanism instance.

static byte[]getNewSessionID()

Returns a legible new session identifier.

static ServerStoreinstance()

Returns the classloader Singleton.

voidinvalidateSession(byte[] sid)

Removes all information related to the designated session ID.

booleanisAlive(byte[] sid)

Returns a boolean flag indicating if the designated session is still alive or not.

SecurityContextrestoreSession(byte[] sid)

Updates the mapping between the designated session identifier and the designated server's SASL Security Context.

Method Detail

cacheSession

void cacheSession(int ttl, SecurityContext ctx)

Records a mapping between a session identifier and the Security Context of the designated SRP server mechanism instance.

Parameters: ttl the session's Time-To-Live indicator (in seconds). ctx the server's security context.

getNewSessionID

static final byte[] getNewSessionID()

Returns a legible new session identifier.

Returns: a new session identifier.

instance

static final ServerStore instance()

Returns the classloader Singleton.

Returns: the classloader Singleton instance.

invalidateSession

void invalidateSession(byte[] sid)

Removes all information related to the designated session ID.

Parameters: sid the identifier of the seesion to invalidate.

isAlive

boolean isAlive(byte[] sid)

Returns a boolean flag indicating if the designated session is still alive or not.

Parameters: sid the identifier of the session to check.

Returns: true if the designated session is still alive. false otherwise.

restoreSession

SecurityContext restoreSession(byte[] sid)

Updates the mapping between the designated session identifier and the designated server's SASL Security Context. In the process, computes and return the underlying mechanism server's evidence that shall be returned to the client in a session re-use exchange.

Parameters: sid the identifier of the session to restore.

Returns: an SRP server's security context.

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.