📄 authenticationcredential.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>AuthenticationCredential (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.credential.AuthenticationCredential class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="AuthenticationCredential (Project JXTA J2SE)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AuthenticationCredential.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href='http://www.jxta.org' target='_blank'>Project JXTA</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="AuthenticationCredential.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">net.jxta.credential</FONT><BR>Class AuthenticationCredential</H2><PRE>java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>net.jxta.credential.AuthenticationCredential</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../net/jxta/credential/Credential.html" title="interface in net.jxta.credential">Credential</A></DD></DL><HR><DL><DT>public final class <B>AuthenticationCredential</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../net/jxta/credential/Credential.html" title="interface in net.jxta.credential">Credential</A></DL><P>Authenication credentials are used by JXTA Membership Services as the basis for applications for peergroup membership. The AuthenticationCredential provides two important pieces of inforamtion: <ul> <li>the authetication method being requested</li> <li>identity information which will be provided to that authentication method.</li> <ul> <p/>Not all authentication methods use the identity nformation.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../net/jxta/credential/Credential.html" title="interface in net.jxta.credential"><CODE>Credential</CODE></A>, <A HREF="../../../net/jxta/membership/MembershipService.html" title="interface in net.jxta.membership"><CODE>MembershipService</CODE></A>, <A HREF="../../../net/jxta/membership/Authenticator.html" title="interface in net.jxta.membership"><CODE>Authenticator</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#AuthenticationCredential(net.jxta.peergroup.PeerGroup, net.jxta.document.Element)">AuthenticationCredential</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> peergroup, <A HREF="../../../net/jxta/document/Element.html" title="interface in net.jxta.document">Element</A> root)</CODE><BR> Creates new AuthenticationCredential</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#AuthenticationCredential(net.jxta.peergroup.PeerGroup, java.lang.String, net.jxta.document.Element)">AuthenticationCredential</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> peergroup, java.lang.String method, <A HREF="../../../net/jxta/document/Element.html" title="interface in net.jxta.document">Element</A> indentityInfo)</CODE><BR> Creates new AuthenticationCredential</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document">StructuredDocument</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#getDocument(net.jxta.document.MimeMediaType)">getDocument</A></B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A> as)</CODE><BR> Write credential into a document. as is a mime media-type specification and provides the form of the document which is being requested. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/document/Element.html" title="interface in net.jxta.document">Element</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#getIdentityInfo()">getIdentityInfo</A></B>()</CODE><BR> Returns the StructuredDocument Element containing the identity information which was originally provided when this AuthenticationCredential was created.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#getMethod()">getMethod</A></B>()</CODE><BR> Returns the authentication method which this AuthenticationCredential will be requesting when it is provided to a Membership Service during the "Apply" operation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#getPeerGroupID()">getPeerGroupID</A></B>()</CODE><BR> Returns the peerGroupID associated with this credential <p/>AuthenticationCredentials are created in the context of a PeerGroup though they are generally independant of peergroups. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#getPeerID()">getPeerID</A></B>()</CODE><BR> Returns the peerID associated with this credential</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#getSourceService()">getSourceService</A></B>()</CODE><BR> Returns the service which generated this credential.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#getSubject()">getSubject</A></B>()</CODE><BR> Returns the subject of this credential. The Objects returned <b>must</b> support <CODE>Object.equals(Object)</CODE> and <CODE>Object.hashCode()</CODE>. <p/>There is no straightforward mechansim for identifying the subject unfortunately.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#handleElement(net.jxta.document.TextElement)">handleElement</A></B>(<A HREF="../../../net/jxta/document/TextElement.html" title="interface in net.jxta.document">TextElement</A> elem)</CODE><BR> Process an individual element from the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#initialize(net.jxta.document.Element)">initialize</A></B>(<A HREF="../../../net/jxta/document/Element.html" title="interface in net.jxta.document">Element</A> root)</CODE><BR> Intialize from a portion of a structured document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#isExpired()">isExpired</A></B>()</CODE><BR> If true then the credential is expired. Some credential implementations may never epxire. <p/>AuthenticationCredential are never expired. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#isValid()">isValid</A></B>()</CODE><BR> Returns true if this credential is currently valid. <p/>AuthenticationCredential are always valid, the Authenticator will determine the true validity from the included identity info.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/credential/AuthenticationCredential.html#setMethod(java.lang.String)">setMethod</A></B>(java.lang.String authenticationMethod)</CODE><BR> </TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="AuthenticationCredential(net.jxta.peergroup.PeerGroup, java.lang.String, net.jxta.document.Element)"><!-- --></A><H3>AuthenticationCredential</H3><PRE>public <B>AuthenticationCredential</B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> peergroup, java.lang.String method, <A HREF="../../../net/jxta/document/Element.html" title="interface in net.jxta.document">Element</A> indentityInfo)</PRE><DL><DD>Creates new AuthenticationCredential<P><DT><B>Parameters:</B><DD><CODE>peergroup</CODE> - The peergroup context in which this AuthenticationCredential is created.<DD><CODE>method</CODE> - The authentication method which will be requested when the AuthentiationCredential is provided to the peergroup Membership Service.<DD><CODE>indentityInfo</CODE> - Optional additional information about the identity being requested which is used by the authentication method. This information is passed to the authentication method during the apply operation of the Membership Service.</DL><HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -