org.beepcore.beep.profile.sasl.anonymous
Class SASLAnonymousProfile

java.lang.Object
  extended byorg.beepcore.beep.core.TuningProfile
      extended byorg.beepcore.beep.profile.sasl.SASLProfile
          extended byorg.beepcore.beep.profile.sasl.anonymous.SASLAnonymousProfile
All Implemented Interfaces:
org.beepcore.beep.profile.Profile, org.beepcore.beep.core.StartChannelListener

public class SASLAnonymousProfile
extends SASLProfile
implements org.beepcore.beep.profile.Profile, org.beepcore.beep.core.StartChannelListener

This class implements the Anonymous SASL mechanism as an extension of the base SASL profile. It uses the TuningProfile methods begin, abort, complete and doesn't really have to do any SASL message exchange really But you could write one that did, and see, the nice thing is that with the CCLs, you can register whatever you want as the profile handler. It just expects (sort of) to find some user info in the blob...as who you're authenticating as.


Field Summary
static java.lang.String ANONYMOUS
           
static java.lang.String MECHANISM
           
static java.lang.String uri
           
 
Fields inherited from class org.beepcore.beep.profile.sasl.SASLProfile
COMPLETE, ENCODING_BASE64, ENCODING_DEFAULT, ENCODING_NONE, LOCALIZE_DEFAULT, SASL, SASL_STATUS_ABORT, SASL_STATUS_COMPLETE, SASL_STATUS_CONTINUE, SASL_STATUS_NONE, sessionTable
 
Constructor Summary
SASLAnonymousProfile()
           
 
Method Summary
 boolean advertiseProfile(org.beepcore.beep.core.Session session)
           
static org.beepcore.beep.core.Session AuthenticateSASLAnonymous(org.beepcore.beep.core.Session session, java.lang.String id)
          Method authencitateSASLAnonymous is an Initiator routine designed to allow a peer to authenticate to another one.
static org.beepcore.beep.core.Session AuthenticateSASLAnonymousPiggyback(org.beepcore.beep.core.Session session, java.lang.String id)
          Method authencitateSASLAnonymousPiggyback is an Initiator routine designed to allow a peer to authenticate to another one.
 void closeChannel(org.beepcore.beep.core.Channel channel)
           
protected  void finishInitiatorAuthentication(org.beepcore.beep.core.SessionCredential c, org.beepcore.beep.core.Session s)
          Method finishInitiatorAuthentication see SASLProfile's version of this.
protected  void finishListenerAuthentication(org.beepcore.beep.core.SessionCredential c, org.beepcore.beep.core.Session s)
          Method finishListenerAuthentication see SASLProfile's version of this.
 org.beepcore.beep.core.StartChannelListener init(java.lang.String uri, org.beepcore.beep.profile.ProfileConfiguration config)
           
 void startChannel(org.beepcore.beep.core.Channel channel, java.lang.String encoding, java.lang.String data)
          Our extension of Start Channel (see ChannelControlListener) does a lot of things.
 
Methods inherited from class org.beepcore.beep.profile.sasl.SASLProfile
clearCredential, failListenerAuthentication
 
Methods inherited from class org.beepcore.beep.core.TuningProfile
abort, begin, begin, complete, disableIO, enableIO, reset, sendProfile, setLocalCredential, setPeerCredential, startChannel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uri

public static final java.lang.String uri
See Also:
Constant Field Values

ANONYMOUS

public static final java.lang.String ANONYMOUS
See Also:
Constant Field Values

MECHANISM

public static final java.lang.String MECHANISM
See Also:
Constant Field Values
Constructor Detail

SASLAnonymousProfile

public SASLAnonymousProfile()
Method Detail

init

public org.beepcore.beep.core.StartChannelListener init(java.lang.String uri,
                                                        org.beepcore.beep.profile.ProfileConfiguration config)
                                                 throws org.beepcore.beep.core.BEEPException
Specified by:
init in interface org.beepcore.beep.profile.Profile
Throws:
org.beepcore.beep.core.BEEPException

startChannel

public void startChannel(org.beepcore.beep.core.Channel channel,
                         java.lang.String encoding,
                         java.lang.String data)
                  throws org.beepcore.beep.core.StartChannelException
Our extension of Start Channel (see ChannelControlListener) does a lot of things. It begins the authentication, and in some cases (if the user has packed data in form on the startChannel request) can actually finish the anonymous authentication.

Specified by:
startChannel in interface org.beepcore.beep.core.StartChannelListener
Throws:
org.beepcore.beep.core.StartChannelException

closeChannel

public void closeChannel(org.beepcore.beep.core.Channel channel)
                  throws org.beepcore.beep.core.CloseChannelException
Specified by:
closeChannel in interface org.beepcore.beep.core.StartChannelListener
Throws:
org.beepcore.beep.core.CloseChannelException

advertiseProfile

public boolean advertiseProfile(org.beepcore.beep.core.Session session)
Specified by:
advertiseProfile in interface org.beepcore.beep.core.StartChannelListener

AuthenticateSASLAnonymous

public static org.beepcore.beep.core.Session AuthenticateSASLAnonymous(org.beepcore.beep.core.Session session,
                                                                       java.lang.String id)
                                                                throws org.beepcore.beep.core.BEEPException,
                                                                       AuthenticationFailureException
Method authencitateSASLAnonymous is an Initiator routine designed to allow a peer to authenticate to another one.

Parameters:
session - Session the current session
id - The identity of the peer withing to authenticate
Throws:
SASLException - if any failure occurs.
org.beepcore.beep.core.BEEPException
AuthenticationFailureException

AuthenticateSASLAnonymousPiggyback

public static org.beepcore.beep.core.Session AuthenticateSASLAnonymousPiggyback(org.beepcore.beep.core.Session session,
                                                                                java.lang.String id)
                                                                         throws org.beepcore.beep.core.BEEPException
Method authencitateSASLAnonymousPiggyback is an Initiator routine designed to allow a peer to authenticate to another one. It is distinct in that it piggybacks the data for the authentication request on the startChannel request.

Parameters:
session - Session the current session
id - The identity of the peer withing to authenticate
Throws:
SASLException - if any failure occurs.
org.beepcore.beep.core.BEEPException

finishInitiatorAuthentication

protected void finishInitiatorAuthentication(org.beepcore.beep.core.SessionCredential c,
                                             org.beepcore.beep.core.Session s)
Method finishInitiatorAuthentication see SASLProfile's version of this.

Overrides:
finishInitiatorAuthentication in class SASLProfile

finishListenerAuthentication

protected void finishListenerAuthentication(org.beepcore.beep.core.SessionCredential c,
                                            org.beepcore.beep.core.Session s)
                                     throws SASLException
Method finishListenerAuthentication see SASLProfile's version of this.

Overrides:
finishListenerAuthentication in class SASLProfile
Throws:
SASLException


Copyright ? 2001 Invisible Worlds, Inc. All Rights Reserved.