org.norther.tammi.spray.authenticator
Class SessionChallenge

java.lang.Object
  extended by org.norther.tammi.spray.authenticator.SessionChallenge
All Implemented Interfaces:
Serializable, EventListener, HttpSessionBindingListener, Challenge

public class SessionChallenge
extends Object
implements Challenge, HttpSessionBindingListener, Serializable

A challenge adapter to be maintain in a session to release its resources when unbound.

Version:
$Id: SessionChallenge.java,v 1.2 2009/09/28 15:08:28 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Constructor Summary
SessionChallenge(Challenge chal)
          Constructs a new challenge.
 
Method Summary
 String getAuthType()
          Gets the authentication type of the this challenge.
 String getDomain()
          Gets the domain name of the this challenge.
 String getMessage()
          Gets the current message.
 String getName()
          Gets the name of the realm of this challenge.
 Principal getPrincipal()
          Gets the authenticated principal when ready.
 String handshake(String msg)
          Handshakes by switching messages.
 void release()
          Releases this challenge.
 void valueBound(HttpSessionBindingEvent event)
           
 void valueUnbound(HttpSessionBindingEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionChallenge

public SessionChallenge(Challenge chal)
Constructs a new challenge.

Parameters:
chal - the challenge adaptee.
Method Detail

getName

public String getName()
Description copied from interface: Challenge
Gets the name of the realm of this challenge.

Specified by:
getName in interface Challenge
Returns:
the realm name.

getDomain

public String getDomain()
Description copied from interface: Challenge
Gets the domain name of the this challenge.

Specified by:
getDomain in interface Challenge
Returns:
the domain name.

getAuthType

public String getAuthType()
Description copied from interface: Challenge
Gets the authentication type of the this challenge.

Specified by:
getAuthType in interface Challenge
Returns:
the authentication type.

getMessage

public String getMessage()
Description copied from interface: Challenge
Gets the current message.

Specified by:
getMessage in interface Challenge
Returns:
the current message.

getPrincipal

public Principal getPrincipal()
Description copied from interface: Challenge
Gets the authenticated principal when ready.

Specified by:
getPrincipal in interface Challenge
Returns:
the principal or null.

handshake

public String handshake(String msg)
Description copied from interface: Challenge
Handshakes by switching messages.

Specified by:
handshake in interface Challenge
Parameters:
msg - the request.
Returns:
the response or null.

release

public void release()
Description copied from interface: Challenge
Releases this challenge.

Specified by:
release in interface Challenge

valueBound

public void valueBound(HttpSessionBindingEvent event)
Specified by:
valueBound in interface HttpSessionBindingListener

valueUnbound

public void valueUnbound(HttpSessionBindingEvent event)
Specified by:
valueUnbound in interface HttpSessionBindingListener


Copyright © 2004 The Norther Organization. All rights reserved.