org.norther.tammi.core.realm
Class DefaultChallenge

java.lang.Object
  extended by org.norther.tammi.core.realm.DefaultChallenge
All Implemented Interfaces:
Serializable, Challenge

public class DefaultChallenge
extends Object
implements Challenge, Serializable

A default implementation of Challenge.

Version:
$Id: DefaultChallenge.java,v 1.4 2010-04-21 17:55:58 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

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.
protected  void setMessage(String msg)
          Sets the current message.
protected  void setPrincipal(Principal princ)
          Sets the authenticated principal.
protected  void setScheme(String scheme)
          Sets the authentication type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

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.

getMessage

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

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

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

setScheme

protected void setScheme(String scheme)
Sets the authentication type.

Parameters:
scheme - the authetication type.

setMessage

protected void setMessage(String msg)
Sets the current message.

Parameters:
msg - the current message.

setPrincipal

protected void setPrincipal(Principal princ)
Sets the authenticated principal.

Parameters:
princ - the principal.


Copyright © 2004 The Norther Organization. All rights reserved.