| java.lang.Object com.sun.security.sasl.PlainClient
PlainClient | final class PlainClient implements SaslClient(Code) | | Implements the PLAIN SASL client mechanism.
(RFC 2595)
author: Rosanna Lee |
Constructor Summary | |
| PlainClient(String authorizationID, String authenticationID, byte[] pw) Creates a SASL mechanism with client credentials that it needs
to participate in Plain authentication exchange with the server.
Parameters: authorizationID - A possibly null string representing the principal for which authorization is being granted; if null, same asauthenticationID Parameters: authenticationID - A non-null string representing the principal being authenticated. |
Method Summary | |
public void | dispose() | public byte[] | evaluateChallenge(byte[] challengeData) Retrieves the initial response for the SASL command, which for
PLAIN is the concatenation of authorization ID, authentication ID
and password, with each component separated by the US-ASCII byte. | protected void | finalize() | public String | getMechanismName() Retrieves this mechanism's name for to initiate the PLAIN protocol
exchange. | public Object | getNegotiatedProperty(String propName) Retrieves the negotiated property. | public boolean | hasInitialResponse() | public boolean | isComplete() Determines whether this mechanism has completed. | public byte[] | unwrap(byte[] incoming, int offset, int len) Unwraps the incoming buffer. | public byte[] | wrap(byte[] outgoing, int offset, int len) Wraps the outgoing buffer. |
PlainClient | PlainClient(String authorizationID, String authenticationID, byte[] pw) throws SaslException(Code) | | Creates a SASL mechanism with client credentials that it needs
to participate in Plain authentication exchange with the server.
Parameters: authorizationID - A possibly null string representing the principal for which authorization is being granted; if null, same asauthenticationID Parameters: authenticationID - A non-null string representing the principal being authenticated. pw is associated with with this principal. Parameters: pw - A non-null byte[] containing the password. |
evaluateChallenge | public byte[] evaluateChallenge(byte[] challengeData) throws SaslException(Code) | | Retrieves the initial response for the SASL command, which for
PLAIN is the concatenation of authorization ID, authentication ID
and password, with each component separated by the US-ASCII byte.
Parameters: challengeData - Ignored A non-null byte array containing the response to be sent to the server. throws: SaslException - If cannot encode ids in UTF-8 |
finalize | protected void finalize()(Code) | | |
getMechanismName | public String getMechanismName()(Code) | | Retrieves this mechanism's name for to initiate the PLAIN protocol
exchange.
The string "PLAIN". |
getNegotiatedProperty | public Object getNegotiatedProperty(String propName)(Code) | | Retrieves the negotiated property.
This method can be called only after the authentication exchange has
completed (i.e., when isComplete() returns true); otherwise, a
SaslException is thrown.
value of property; only QOP is applicable to PLAIN. exception: IllegalStateException - if this authentication exchange has not completed |
hasInitialResponse | public boolean hasInitialResponse()(Code) | | |
isComplete | public boolean isComplete()(Code) | | Determines whether this mechanism has completed.
Plain completes after returning one response.
true if has completed; false otherwise; |
unwrap | public byte[] unwrap(byte[] incoming, int offset, int len) throws SaslException(Code) | | Unwraps the incoming buffer.
throws: SaslException - Not applicable to this mechanism. |
wrap | public byte[] wrap(byte[] outgoing, int offset, int len) throws SaslException(Code) | | Wraps the outgoing buffer.
throws: SaslException - Not applicable to this mechanism. |
|
|