Name

AuthenticationCredential

Synopsis

An authentication credential is used when joining a peergroup: you construct the credential and pass it to the method of the memebership service for the peergroup that you want to join.

Membership services may have multiple methods by which they authenticate a peer, in which case you should specify the name of the method the service should use when you construct the authentication credential. Similarly, the membership service may require an identity document; you create the document and use it to create the authentication credential. Often, though, the identity document can be null, and you can use specific methods of the Authenticator class to fill in the peer’s identity.

The membership service uses the getDocument( ) method to obtain a document containing the authentication credentials.

public final class AuthenticationCredential implements Credential {
// Public Constructors
   public AuthenticationCredential(net.jxta.peergroup.PeerGroup peergroup, String method,
      net.jxta.document.Element indentityInfo);
// Public Instance Methods
   public net.jxta.document.Element getIdentityInfo();  
   public String getMethod();  
// Methods Implementing Credential
   public net.jxta.document.StructuredDocument getDocument(net.jxta.document.MimeMediaType as) 
       throws Exception; 
   public net.jxta.id.ID getPeerGroupID();  
   public net.jxta.id.ID getPeerID();  
   public net.jxta.membership.MembershipService getSourceService(); 
// constant
}

Passed To

net.jxta.membership.MembershipService.apply() ...

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.