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

📄 saslauthentication.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="CHARSET"><!-- --></A><H3>CHARSET</H3><PRE>protected static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>CHARSET</B></PRE><DL><DD>The utf-8 charset for decoding and encoding Jabber packet streams.<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="SASLAuthentication()"><!-- --></A><H3>SASLAuthentication</H3><PRE>public <B>SASLAuthentication</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getSASLMechanisms(org.jivesoftware.openfire.session.LocalSession)"><!-- --></A><H3>getSASLMechanisms</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getSASLMechanisms</B>(<A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html" title="class in org.jivesoftware.openfire.session">LocalSession</A>&nbsp;session)</PRE><DL><DD>Returns a string with the valid SASL mechanisms available for the specified session. If the session's connection is not secured then only include the SASL mechanisms that don't require TLS.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>session</CODE> - The current session<DT><B>Returns:</B><DD>a string with the valid SASL mechanisms available for the specified session.</DL></DD></DL><HR><A NAME="getSASLMechanismsElement(org.jivesoftware.openfire.session.Session)"><!-- --></A><H3>getSASLMechanismsElement</H3><PRE>public static org.dom4j.Element <B>getSASLMechanismsElement</B>(<A HREF="../../../../org/jivesoftware/openfire/session/Session.html" title="interface in org.jivesoftware.openfire.session">Session</A>&nbsp;session)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="handle(org.jivesoftware.openfire.session.LocalSession, org.dom4j.Element)"><!-- --></A><H3>handle</H3><PRE>public static <A HREF="../../../../org/jivesoftware/openfire/net/SASLAuthentication.Status.html" title="enum in org.jivesoftware.openfire.net">SASLAuthentication.Status</A> <B>handle</B>(<A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html" title="class in org.jivesoftware.openfire.session">LocalSession</A>&nbsp;session,                                               org.dom4j.Element&nbsp;doc)                                        throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/UnsupportedEncodingException.html" title="class or interface in java.io">UnsupportedEncodingException</A></PRE><DL><DD>Handles the SASL authentication packet. The entity may be sending an initial authentication request or a response to a challenge made by the server. The returned value indicates whether the authentication has finished either successfully or not or if the entity is expected to send a response to a challenge.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>session</CODE> - the session that is authenticating with the server.<DD><CODE>doc</CODE> - the stanza sent by the authenticating entity.<DT><B>Returns:</B><DD>value that indicates whether the authentication has finished either successfully         or not or if the entity is expected to send a response to a challenge.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/UnsupportedEncodingException.html" title="class or interface in java.io">UnsupportedEncodingException</A></CODE> - If UTF-8 charset is not supported.</DL></DD></DL><HR><A NAME="isSharedSecretAllowed()"><!-- --></A><H3>isSharedSecretAllowed</H3><PRE>public static boolean <B>isSharedSecretAllowed</B>()</PRE><DL><DD>Returns true if shared secret authentication is enabled. Shared secret authentication creates an anonymous session, but requires that the authenticating entity know a shared secret key. The client sends a digest of the secret key, which is compared against a digest of the local shared key.<P><DD><DL><DT><B>Returns:</B><DD>true if shared secret authentication is enabled.</DL></DD></DL><HR><A NAME="setSharedSecretAllowed(boolean)"><!-- --></A><H3>setSharedSecretAllowed</H3><PRE>public static void <B>setSharedSecretAllowed</B>(boolean&nbsp;sharedSecretAllowed)</PRE><DL><DD>Sets whether shared secret authentication is enabled. Shared secret authentication creates an anonymous session, but requires that the authenticating entity know a shared secret key. The client sends a digest of the secret key, which is compared against a digest of the local shared key.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>sharedSecretAllowed</CODE> - true if shared secret authentication should be enabled.</DL></DD></DL><HR><A NAME="getSharedSecret()"><!-- --></A><H3>getSharedSecret</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getSharedSecret</B>()</PRE><DL><DD>Returns the shared secret value, or <tt>null</tt> if shared secret authentication is disabled. If this is the first time the shared secret value has been requested (and shared secret auth is enabled), the key will be randomly generated and stored in the property <tt>xmpp.auth.sharedSecret</tt>.<P><DD><DL><DT><B>Returns:</B><DD>the shared secret value.</DL></DD></DL><HR><A NAME="authenticateSharedSecret(java.lang.String)"><!-- --></A><H3>authenticateSharedSecret</H3><PRE>public static boolean <B>authenticateSharedSecret</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;digest)</PRE><DL><DD>Returns true if the supplied digest matches the shared secret value. The digest must be an MD5 hash of the secret key, encoded as hex. This value is supplied by clients attempting shared secret authentication.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>digest</CODE> - the MD5 hash of the secret key, encoded as hex.<DT><B>Returns:</B><DD>true if authentication succeeds.</DL></DD></DL><HR><A NAME="addSupportedMechanism(java.lang.String)"><!-- --></A><H3>addSupportedMechanism</H3><PRE>public static void <B>addSupportedMechanism</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;mechanism)</PRE><DL><DD>Adds a new SASL mechanism to the list of supported SASL mechanisms by the server. The new mechanism will be offered to clients and connection managers as stream features.<p> Note: this method simply registers the SASL mechanism to be advertised as a supported mechanism by Openfire. Actual SASL handling is done by Java itself, so you must add the provider to Java.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>mechanism</CODE> - the new SASL mechanism.</DL></DD></DL><HR><A NAME="removeSupportedMechanism(java.lang.String)"><!-- --></A><H3>removeSupportedMechanism</H3><PRE>public static void <B>removeSupportedMechanism</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;mechanism)</PRE><DL><DD>Removes a SASL mechanism from the list of supported SASL mechanisms by the server.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>mechanism</CODE> - the SASL mechanism to remove.</DL></DD></DL><HR><A NAME="getSupportedMechanisms()"><!-- --></A><H3>getSupportedMechanisms</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt; <B>getSupportedMechanisms</B>()</PRE><DL><DD>Returns the list of supported SASL mechanisms by the server. Note that Java may have support for more mechanisms but some of them may not be returned since a special setup is required that might be missing. Use <A HREF="../../../../org/jivesoftware/openfire/net/SASLAuthentication.html#addSupportedMechanism(java.lang.String)"><CODE>addSupportedMechanism(String)</CODE></A> to add new SASL mechanisms.<P><DD><DL><DT><B>Returns:</B><DD>the list of supported SASL mechanisms by the server.</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>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/jivesoftware/openfire/net/OCSPChecker.html" title="class in org.jivesoftware.openfire.net"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/jivesoftware/openfire/net/SASLAuthentication.ElementType.html" title="enum in org.jivesoftware.openfire.net"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?org/jivesoftware/openfire/net/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;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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-2008 Jive Software.</i></BODY></HTML>

⌨️ 快捷键说明

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