JXTA

net.jxta.impl.membership.passwd
Class PasswdMembershipService.PasswdAuthenticator

java.lang.Object
  extended by net.jxta.impl.membership.PasswdMembershipService.PasswdAuthenticator
      extended by net.jxta.impl.membership.passwd.PasswdMembershipService.PasswdAuthenticator
All Implemented Interfaces:
Authenticator
Enclosing class:
PasswdMembershipService

public static final class PasswdMembershipService.PasswdAuthenticator
extends PasswdMembershipService.PasswdAuthenticator

Creates an authenticator for the passwd membership service. Anything entered into the identity info section of the Authentication credential is ignored.

HACK ALERT! THE INHERITANCE FROM net.jxta.impl.membership.PasswdMembershipService.PasswdAuthenticator IS A TOTAL HACK FOR BACKWARDS COMPATIBILITY.


Field Summary
(package private)  AuthenticationCredential application
          The Authentication which was provided to the Apply operation of the membership service.
(package private)  String password
          the password for that identity.
(package private)  PasswdMembershipService source
          The Membership Service which generated this authenticator.
(package private)  String whoami
          the identity which is being claimed
 
Constructor Summary
PasswdMembershipService.PasswdAuthenticator(PasswdMembershipService source, AuthenticationCredential application)
          Creates an authenticator for the password MembershipService service.
 
Method Summary
 String getAuth1Identity()
           
protected  String getAuth2_Password()
           
 AuthenticationCredential getAuthenticationCredential()
          Return the Authentication Credential associated with this authenticator, if any.
 String getMethodName()
          Returns the name of this authentication method.
 MembershipService getSourceService()
          Returns the service which generated this authenticator.
 boolean isReadyForJoin()
          Returns true if this Authenticator has been satisfied and is ready for submission to MembershipService.join(Authenticator).
 void setAuth1Identity(String who)
           
 void setAuth2_Password(String secret)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

PasswdMembershipService source
The Membership Service which generated this authenticator.


application

AuthenticationCredential application
The Authentication which was provided to the Apply operation of the membership service.


whoami

String whoami
the identity which is being claimed


password

String password
the password for that identity.

Constructor Detail

PasswdMembershipService.PasswdAuthenticator

PasswdMembershipService.PasswdAuthenticator(PasswdMembershipService source,
                                            AuthenticationCredential application)
Creates an authenticator for the password MembershipService service. The only method supported is "PasswdAuthentication". Anything entered into the identity info section of the Authentication credential is ignored.

Parameters:
source - The instance of the password membership service which created this authenticator.
application - The Anything entered into the identity info section of the Authentication credential is ignored.
Method Detail

getSourceService

public MembershipService getSourceService()
Returns the service which generated this authenticator. This is the service which provided this authenticator and the service which will accept this authenticator when the authenticator is completed.

Returns:
the MembershipService service associated with this authenticator.

isReadyForJoin

public boolean isReadyForJoin()
Returns true if this Authenticator has been satisfied and is ready for submission to MembershipService.join(Authenticator). Some authenticators may behave asynchronously and this method can be used to determine if the authentication process has completed.

This method provides no distinction between incomplete authentication and failed authentication.

Returns:
true if the authenticator object is complete and ready for submitting to the Membership Service service for MembershipService.join(Authenticator), otherwise false.
See Also:
MembershipService.join(Authenticator)

getMethodName

public String getMethodName()
Returns the name of this authentication method. This should be the same name which was used in the Authentication credential.

Returns:
String containing the name of this authentication method.

getAuthenticationCredential

public AuthenticationCredential getAuthenticationCredential()
Return the Authentication Credential associated with this authenticator, if any.

Returns:
the AutheticationCredential which was provided to the MembershipService.apply(AuthenticationCredential).

setAuth1Identity

public void setAuth1Identity(String who)
Specified by:
setAuth1Identity in class PasswdMembershipService.PasswdAuthenticator

getAuth1Identity

public String getAuth1Identity()
Specified by:
getAuth1Identity in class PasswdMembershipService.PasswdAuthenticator

setAuth2_Password

public void setAuth2_Password(String secret)
Specified by:
setAuth2_Password in class PasswdMembershipService.PasswdAuthenticator

getAuth2_Password

protected String getAuth2_Password()
Specified by:
getAuth2_Password in class PasswdMembershipService.PasswdAuthenticator

JXSE