⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saslauthentication.html

📁 开源项目smack的API文件
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<DL><DD>Registers a new SASL mechanism in the specified preference position. The client will try to authenticate using the most prefered SASL mechanism that is also supported by the server. <p/> <p/> Use the <tt>index</tt> parameter to set the level of preference of the new SASL mechanism. A value of 0 means that the mechanism is the most prefered one.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - preference position amongst all the implemented SASL mechanism. Starts with 0.<DD><CODE>name</CODE> - common name of the SASL mechanism. E.g.: PLAIN, DIGEST-MD5 or KERBEROS_V4.<DD><CODE>mClass</CODE> - a SASLMechanism subclass.</DL></DD></DL><HR><A NAME="unregisterSASLMechanism(java.lang.String)"><!-- --></A><H3>unregisterSASLMechanism</H3><PRE>public static void <B>unregisterSASLMechanism</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Unregisters an existing SASL mechanism. Once the mechanism has been unregistered it won't be possible to authenticate users using the removed SASL mechanism.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - common name of the SASL mechanism. E.g.: PLAIN, DIGEST-MD5 or KERBEROS_V4.</DL></DD></DL><HR><A NAME="getRegisterSASLMechanisms()"><!-- --></A><H3>getRegisterSASLMechanisms</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&gt; <B>getRegisterSASLMechanisms</B>()</PRE><DL><DD>Returns the registerd SASLMechanism classes sorted by the level of preference.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the registerd SASLMechanism classes sorted by the level of preference.</DL></DD></DL><HR><A NAME="hasAnonymousAuthentication()"><!-- --></A><H3>hasAnonymousAuthentication</H3><PRE>public boolean <B>hasAnonymousAuthentication</B>()</PRE><DL><DD>Returns true if the server offered ANONYMOUS SASL as a way to authenticate users.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the server offered ANONYMOUS SASL as a way to authenticate users.</DL></DD></DL><HR><A NAME="hasNonAnonymousAuthentication()"><!-- --></A><H3>hasNonAnonymousAuthentication</H3><PRE>public boolean <B>hasNonAnonymousAuthentication</B>()</PRE><DL><DD>Returns true if the server offered SASL authentication besides ANONYMOUS SASL.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the server offered SASL authentication besides ANONYMOUS SASL.</DL></DD></DL><HR><A NAME="authenticate(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>authenticate</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>authenticate</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;username,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;password,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;resource)                    throws <A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Performs SASL authentication of the specified user. If SASL authentication was successful then resource binding and session establishment will be performed. This method will return the full JID provided by the server while binding a resource to the connection.<p> The server may assign a full JID with a username or resource different than the requested by this method.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username that is authenticating with the server.<DD><CODE>password</CODE> - the password to send to the server.<DD><CODE>resource</CODE> - the desired resource.<DT><B>Returns:</B><DD>the full JID provided by the server while binding a resource to the connection.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occures while authenticating.</DL></DD></DL><HR><A NAME="authenticateAnonymously()"><!-- --></A><H3>authenticateAnonymously</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>authenticateAnonymously</B>()                               throws <A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Performs ANONYMOUS SASL authentication. If SASL authentication was successful then resource binding and session establishment will be performed. This method will return the full JID provided by the server while binding a resource to the connection.<p> The server will assign a full JID with a randomly generated resource and possibly with no username.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the full JID provided by the server while binding a resource to the connection.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occures while authenticating.</DL></DD></DL><HR><A NAME="isAuthenticated()"><!-- --></A><H3>isAuthenticated</H3><PRE>public boolean <B>isAuthenticated</B>()</PRE><DL><DD>Returns true if the user was able to authenticate with the server usins SASL.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the user was able to authenticate with the server usins SASL.</DL></DD></DL><HR><A NAME="send(java.lang.String)"><!-- --></A><H3>send</H3><PRE>public void <B>send</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;stanza)          throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DD></DL><HR><A NAME="init()"><!-- --></A><H3>init</H3><PRE>protected void <B>init</B>()</PRE><DL><DD>Initializes the internal state in order to be able to be reused. The authentication is used by the connection at the first login and then reused after the connection is disconnected and then reconnected.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Smack</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../org/jivesoftware/smack/RosterListener.html" title="interface in org.jivesoftware.smack"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/jivesoftware/smack/SmackConfiguration.html" title="class in org.jivesoftware.smack"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?org/jivesoftware/smack/SASLAuthentication.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="SASLAuthentication.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &copy; 2003-2007 Jive Software. </i></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -