Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

net.jxta.credential
Interface Credential  view Credential download Credential.java

All Known Subinterfaces:
PrivilegedOperation, PrivledgedOperation
All Known Implementing Classes:
AuthenticationCredential

public interface Credential

Credentials provide the basic mechanisms for securly establishing and communicating identity within JXTA. Credentials have three different roles within JXTA:

The XML representation of a Credential uses the following very simple schema. Credential implementations extend this schema as needed.

 <xs:complexType name="Cred">
   <xs:all>
   </xs:all>
 </xs:complexType>
 


Method Summary
 net.jxta.document.StructuredDocument getDocument(net.jxta.document.MimeMediaType asMimeType)
          Write credential into a document.
 net.jxta.id.ID getPeerGroupID()
          Returns the peerGroupID associated with this credential
 net.jxta.id.ID getPeerID()
          Returns the peerID associated with this credential
 net.jxta.service.Service getSourceService()
          Returns the service which generated this credential.
 java.lang.Object getSubject()
          Returns the subject of this credential.
 boolean isExpired()
          If true then the credential is expired.
 boolean isValid()
          Returns true if this credential is currently valid.
 

Method Detail

getPeerGroupID

public net.jxta.id.ID getPeerGroupID()
Returns the peerGroupID associated with this credential


getPeerID

public net.jxta.id.ID getPeerID()
Returns the peerID associated with this credential


getSourceService

public net.jxta.service.Service getSourceService()
Returns the service which generated this credential.


isExpired

public boolean isExpired()
If true then the credential is expired. Some credential implementations may never epxire.


isValid

public boolean isValid()
Returns true if this credential is currently valid.


getSubject

public java.lang.Object getSubject()
Returns the subject of this credential. The Objects returned must support Object.equals(Object)>Object.equals(Object) 55 and Object.hashCode()>Object.hashCode() 55 .


getDocument

public net.jxta.document.StructuredDocument getDocument(net.jxta.document.MimeMediaType asMimeType)
                                                 throws java.lang.Exception
Write credential into a document. asMimeType is a mime media-type specification and provides the form of the document which is being requested. Two standard document forms are defined. "text/plain" encodes the document in a "pretty-print" format for human viewing and "text/xml" which provides an XML format.

Depending on the credential format this document may be cryptographically signed to prevent alteration.