JXTA

net.jxta.impl.membership.pse
Class StringAuthenticator

java.lang.Object
  extended by net.jxta.impl.membership.pse.StringAuthenticator
All Implemented Interfaces:
Authenticator
Direct Known Subclasses:
DialogAuthenticator

public class StringAuthenticator
extends Object
implements Authenticator

An authenticator associated with the PSE membership service.

See Also:
Authenticator, MembershipService

Field Summary
(package private)  AuthenticationCredential application
          The Authentication which was provided to the Apply operation of the membership service.
(package private)  ID identity
          the identity which is being claimed
(package private)  char[] key_password
          the password for that identity.
(package private)  X509Certificate seedCert
          The certficate which we are authenticating against
(package private)  EncryptedPrivateKeyInfo seedKey
          The encrypted private key which we must unlock.
(package private)  PSEMembershipService source
          The Membership Service which generated this authenticator.
(package private)  char[] store_password
          the password for that identity.
 
Constructor Summary
StringAuthenticator(PSEMembershipService source, AuthenticationCredential application)
          Creates an authenticator for the PSE membership service.
StringAuthenticator(PSEMembershipService source, AuthenticationCredential application, X509Certificate seedCert, EncryptedPrivateKeyInfo seedKey)
          Creates an authenticator for the PSE membership service.
 
Method Summary
protected  void finalize()
          
 char[] getAuth1_KeyStorePassword()
          Get KeyStore password
 ID getAuth2Identity()
          Get Identity
 char[] getAuth3_IdentityPassword()
          Get identity password
 AuthenticationCredential getAuthenticationCredential()
          Return the Authentication Credential associated with this authenticator, if any.
 X509Certificate getCertificate(char[] store_password, ID aPeer)
          Returns the X509 Certificate associated with the specified ID.
 PeerID[] getIdentities(char[] store_password)
          Return the available identities.
 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 setAuth1_KeyStorePassword(char[] store_password)
          Set KeyStore password
 void setAuth1_KeyStorePassword(String store_password)
          Set KeyStore password
 void setAuth2Identity(ID identity)
          Set Identity
 void setAuth2Identity(String id)
          Set Identity
 void setAuth3_IdentityPassword(char[] key_password)
          Set identity password
 void setAuth3_IdentityPassword(String key_password)
          Set identity password
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

transient PSEMembershipService source
The Membership Service which generated this authenticator.


application

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


seedCert

transient X509Certificate seedCert
The certficate which we are authenticating against


seedKey

transient EncryptedPrivateKeyInfo seedKey
The encrypted private key which we must unlock.


store_password

transient char[] store_password
the password for that identity.


identity

transient ID identity
the identity which is being claimed


key_password

transient char[] key_password
the password for that identity.

Constructor Detail

StringAuthenticator

StringAuthenticator(PSEMembershipService source,
                    AuthenticationCredential application,
                    X509Certificate seedCert,
                    EncryptedPrivateKeyInfo seedKey)
Creates an authenticator for the PSE membership service. Anything entered into the identity info section of the Authentication credential is ignored.

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

StringAuthenticator

StringAuthenticator(PSEMembershipService source,
                    AuthenticationCredential application)
Creates an authenticator for the PSE membership service. Anything entered into the identity info section of the Authentication credential is ignored.

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

finalize

protected void finalize()
                 throws Throwable

Overrides:
finalize in class Object
Throws:
Throwable

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.

Specified by:
getSourceService in interface Authenticator
Returns:
the MembershipService service associated with this authenticator.

getAuthenticationCredential

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

Specified by:
getAuthenticationCredential in interface Authenticator
Returns:
the AutheticationCredential which was provided to the MembershipService.apply(AuthenticationCredential).

getMethodName

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

Specified by:
getMethodName in interface Authenticator
Returns:
String containing the name of this authentication method.

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.

Specified by:
isReadyForJoin in interface Authenticator
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)

getAuth1_KeyStorePassword

public char[] getAuth1_KeyStorePassword()
Get KeyStore password


setAuth1_KeyStorePassword

public void setAuth1_KeyStorePassword(String store_password)
Set KeyStore password


setAuth1_KeyStorePassword

public void setAuth1_KeyStorePassword(char[] store_password)
Set KeyStore password


getIdentities

public PeerID[] getIdentities(char[] store_password)
Return the available identities.


getCertificate

public X509Certificate getCertificate(char[] store_password,
                                      ID aPeer)
Returns the X509 Certificate associated with the specified ID.

Parameters:
store_password - The password for the keystore.
aPeer - The peer who's certificate is desired. For uninitialized keystores this must be the peerid of the registering peer.

getAuth2Identity

public ID getAuth2Identity()
Get Identity


setAuth2Identity

public void setAuth2Identity(String id)
Set Identity


setAuth2Identity

public void setAuth2Identity(ID identity)
Set Identity


getAuth3_IdentityPassword

public char[] getAuth3_IdentityPassword()
Get identity password


setAuth3_IdentityPassword

public void setAuth3_IdentityPassword(String key_password)
Set identity password


setAuth3_IdentityPassword

public void setAuth3_IdentityPassword(char[] key_password)
Set identity password


JXSE