|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.credential.AuthenticationCredential
public final class AuthenticationCredential
Authenication credentials are used by JXTA Membership Services as the basis for applications for peergroup membership. The AuthenticationCredential provides two important pieces of inforamtion:
Credential
,
MembershipService
,
Authenticator
Constructor Summary | |
---|---|
AuthenticationCredential(PeerGroup peergroup,
Element root)
Creates new AuthenticationCredential |
|
AuthenticationCredential(PeerGroup peergroup,
String method,
Element indentityInfo)
Creates new AuthenticationCredential |
Method Summary | |
---|---|
StructuredDocument |
getDocument(MimeMediaType as)
Write credential into a document. as is a mime media-type specification and provides the form of the document which is being requested. |
Element |
getIdentityInfo()
Returns the StructuredDocument Element containing the identity information which was originally provided when this AuthenticationCredential was created. |
String |
getMethod()
Returns the authentication method which this AuthenticationCredential will be requesting when it is provided to a Membership Service during the "Apply" operation. |
ID |
getPeerGroupID()
Returns the peerGroupID associated with this credential. |
ID |
getPeerID()
Returns the peerID associated with this credential. |
Service |
getSourceService()
Returns the service which generated this credential. |
Object |
getSubject()
Returns the subject of this credential. |
protected boolean |
handleElement(TextElement elem)
Process an individual element from the document. |
protected void |
initialize(Element root)
Intialize from a portion of a structured document. |
boolean |
isExpired()
Returns true if this credential is expired. |
boolean |
isValid()
Returns true if this credential is currently valid. |
protected void |
setMethod(String authenticationMethod)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthenticationCredential(PeerGroup peergroup, String method, Element indentityInfo)
peergroup
- The peergroup context in which this
AuthenticationCredential is created.method
- The authentication method which will be requested when the
AuthentiationCredential is provided to the peergroup Membership Service.
Authentication methods are specific to Membership services. Consult the
Documentation for the Membership service you will be authenticating
against in order to determine the valid method values. Every
Membership service should support a default authentication method which
can be specified as null.indentityInfo
- Optional additional information which is used by the
authentication method or null. This information is passed to the
authentication method during the apply operation of the Membership
Service. Consult the documentation for the specific Membership Service
you are using for details on how this information is used (if at all).public AuthenticationCredential(PeerGroup peergroup, Element root)
peergroup
- The peergroup context in which this
AuthenticationCredential is created.root
- the document containing the serialized representation of the
AuthenticationCredential.Method Detail |
---|
public ID getPeerGroupID()
getPeerGroupID
in interface Credential
public ID getPeerID()
getPeerID
in interface Credential
public Service getSourceService()
getSourceService
in interface Credential
public boolean isExpired()
true
if this credential is expired. Some credential
implementations may never expire.
AuthenticationCredential are never expired. The Authenticator will
determine the true validity from the included identity info.
isExpired
in interface Credential
true
if this credential is expired, otherwise
false
.public boolean isValid()
true
if this credential is currently valid.
AuthenticationCredential are always valid, the Authenticator will
determine the true validity from the included identity info.
isValid
in interface Credential
true
if the credential is currently valid, otherwise
false
.public Object getSubject()
Object.equals(Object)
and Object.hashCode()
.
There is no straightforward mechansim for identifying the subject
unfortunately.
getSubject
in interface Credential
public StructuredDocument getDocument(MimeMediaType as) throws Exception
getDocument
in interface Credential
as
- The mime media type of the encoding format being requested.
Exception
- When errors occur.public String getMethod()
protected void setMethod(String authenticationMethod)
public Element getIdentityInfo()
protected boolean handleElement(TextElement elem)
elem
- the element to be processed.
protected void initialize(Element root)
root
- the element
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |