jdk/src/share/classes/javax/security/sasl/SaslServer.java
author weijun
Thu, 10 Jul 2014 10:44:48 +0800
changeset 25403 e982fe3e83a4
parent 18830 90956ead732f
permissions -rw-r--r--
8044085: Access ExtendedGSSContext.inquireSecContext() result through SASL Reviewed-by: mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
     2
 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.security.sasl;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * Performs SASL authentication as a server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 *<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * A server such an LDAP server gets an instance of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * class in order to perform authentication defined by a specific SASL
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
    33
 * mechanism. Invoking methods on the {@code SaslServer} instance
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * generates challenges according to the SASL
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
    35
 * mechanism implemented by the {@code SaslServer}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * As the authentication proceeds, the instance
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * encapsulates the state of a SASL server's authentication exchange.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 *<p>
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
    39
 * Here's an example of how an LDAP server might use a {@code SaslServer}.
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
    40
 * It first gets an instance of a {@code SaslServer} for the SASL mechanism
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * requested by the client:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 *<blockquote><pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * SaslServer ss = Sasl.createSaslServer(mechanism,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 *     "ldap", myFQDN, props, callbackHandler);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 *</pre></blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * It can then proceed to use the server for authentication.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * For example, suppose the LDAP server received an LDAP BIND request
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * containing the name of the SASL mechanism and an (optional) initial
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * response. It then might use the server as follows:
18156
edb590d448c5 8016217: More javadoc warnings
alanb
parents: 5506
diff changeset
    50
 *<blockquote><pre>{@code
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * while (!ss.isComplete()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 *     try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 *         byte[] challenge = ss.evaluateResponse(response);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 *         if (ss.isComplete()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 *             status = ldap.sendBindResponse(mechanism, challenge, SUCCESS);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 *         } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *             status = ldap.sendBindResponse(mechanism, challenge,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
                   SASL_BIND_IN_PROGRESS);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 *             response = ldap.readBindRequest();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 *         }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 *     } catch (SaslException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 *          status = ldap.sendErrorResponse(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 *          break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 *     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * if (ss.isComplete() && status == SUCCESS) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 *    String qop = (String) sc.getNegotiatedProperty(Sasl.QOP);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 *    if (qop != null
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 *        && (qop.equalsIgnoreCase("auth-int")
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 *            || qop.equalsIgnoreCase("auth-conf"))) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 *      // Use SaslServer.wrap() and SaslServer.unwrap() for future
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 *      // communication with client
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 *      ldap.in = new SecureInputStream(ss, ldap.in);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 *      ldap.out = new SecureOutputStream(ss, ldap.out);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 *    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * }
18156
edb590d448c5 8016217: More javadoc warnings
alanb
parents: 5506
diff changeset
    78
 *}</pre></blockquote>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 * @see Sasl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 * @see SaslServerFactory
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * @author Rosanna Lee
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * @author Rob Weltman
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
public abstract interface SaslServer {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     * Returns the IANA-registered mechanism name of this SASL server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * (e.g. "CRAM-MD5", "GSSAPI").
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     * @return A non-null string representing the IANA-registered mechanism name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    public abstract String getMechanismName();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * Evaluates the response data and generates a challenge.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     * If a response is received from the client during the authentication
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * process, this method is called to prepare an appropriate next
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * challenge to submit to the client. The challenge is null if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * authentication has succeeded and no more challenge data is to be sent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     * to the client. It is non-null if the authentication must be continued
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     * by sending a challenge to the client, or if the authentication has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     * succeeded but challenge data needs to be processed by the client.
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   107
     * {@code isComplete()} should be called
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   108
     * after each call to {@code evaluateResponse()},to determine if any further
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * response is needed from the client.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     * @param response The non-null (but possibly empty) response sent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     * by the client.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     * @return The possibly null challenge to send to the client.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     * It is null if the authentication has succeeded and there is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     * no more challenge data to be sent to the client.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
     * @exception SaslException If an error occurred while processing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * the response or generating a challenge.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    public abstract byte[] evaluateResponse(byte[] response)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        throws SaslException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
      * Determines whether the authentication exchange has completed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
      * This method is typically called after each invocation of
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   126
      * {@code evaluateResponse()} to determine whether the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
      * authentication has completed successfully or should be continued.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
      * @return true if the authentication exchange has completed; false otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    public abstract boolean isComplete();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     * Reports the authorization ID in effect for the client of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     * session.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
     * This method can only be called if isComplete() returns true.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * @return The authorization ID of the client.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * @exception IllegalStateException if this authentication session has not completed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    public String getAuthorizationID();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * Unwraps a byte array received from the client.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * This method can be called only after the authentication exchange has
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   144
     * completed (i.e., when {@code isComplete()} returns true) and only if
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * the authentication exchange has negotiated integrity and/or privacy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * as the quality of protection; otherwise,
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   147
     * an {@code IllegalStateException} is thrown.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     *<p>
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   149
     * {@code incoming} is the contents of the SASL buffer as defined in RFC 2222
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * without the leading four octet field that represents the length.
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   151
     * {@code offset} and {@code len} specify the portion of {@code incoming}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * to use.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     * @param incoming A non-null byte array containing the encoded bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     *                from the client.
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   156
     * @param offset The starting position at {@code incoming} of the bytes to use.
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   157
     * @param len The number of bytes from {@code incoming} to use.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * @return A non-null byte array containing the decoded bytes.
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   159
     * @exception SaslException if {@code incoming} cannot be successfully
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * unwrapped.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * @exception IllegalStateException if the authentication exchange has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * not completed, or if the negotiated quality of protection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * has neither integrity nor privacy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    public abstract byte[] unwrap(byte[] incoming, int offset, int len)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        throws SaslException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     * Wraps a byte array to be sent to the client.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * This method can be called only after the authentication exchange has
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   171
     * completed (i.e., when {@code isComplete()} returns true) and only if
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * the authentication exchange has negotiated integrity and/or privacy
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   173
     * as the quality of protection; otherwise, a {@code SaslException} is thrown.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     *<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * The result of this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * will make up the contents of the SASL buffer as defined in RFC 2222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * without the leading four octet field that represents the length.
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   178
     * {@code offset} and {@code len} specify the portion of {@code outgoing}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * to use.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     * @param outgoing A non-null byte array containing the bytes to encode.
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   182
     * @param offset The starting position at {@code outgoing} of the bytes to use.
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   183
     * @param len The number of bytes from {@code outgoing} to use.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     * @return A non-null byte array containing the encoded bytes.
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   185
     * @exception SaslException if {@code outgoing} cannot be successfully
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     * wrapped.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     * @exception IllegalStateException if the authentication exchange has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     * not completed, or if the negotiated quality of protection has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     * neither integrity nor privacy.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    public abstract byte[] wrap(byte[] outgoing, int offset, int len)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        throws SaslException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
     * Retrieves the negotiated property.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     * This method can be called only after the authentication exchange has
18830
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   197
     * completed (i.e., when {@code isComplete()} returns true); otherwise, an
90956ead732f 8020557: javadoc cleanup in javax.security
juh
parents: 18156
diff changeset
   198
     * {@code IllegalStateException} is thrown.
25403
e982fe3e83a4 8044085: Access ExtendedGSSContext.inquireSecContext() result through SASL
weijun
parents: 18830
diff changeset
   199
     * <p>
e982fe3e83a4 8044085: Access ExtendedGSSContext.inquireSecContext() result through SASL
weijun
parents: 18830
diff changeset
   200
     * The {@link Sasl} class includes several well-known property names
e982fe3e83a4 8044085: Access ExtendedGSSContext.inquireSecContext() result through SASL
weijun
parents: 18830
diff changeset
   201
     * (For example, {@link Sasl#QOP}). A SASL provider can support other
e982fe3e83a4 8044085: Access ExtendedGSSContext.inquireSecContext() result through SASL
weijun
parents: 18830
diff changeset
   202
     * properties which are specific to the vendor and/or a mechanism.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * @param propName the property
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     * @return The value of the negotiated property. If null, the property was
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     * not negotiated or is not applicable to this mechanism.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     * @exception IllegalStateException if this authentication exchange has not completed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    public abstract Object getNegotiatedProperty(String propName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
      * Disposes of any system resources or security-sensitive information
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
      * the SaslServer might be using. Invoking this method invalidates
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
      * the SaslServer instance. This method is idempotent.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
      * @throws SaslException If a problem was encountered while disposing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
      * the resources.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    public abstract void dispose() throws SaslException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
}