public class IAMSaslClient
extends java.lang.Object
implements javax.security.sasl.SaslClient
AWS4SignedPayloadGenerator.
The credentials used to sign the payload are fetched by invoking the
IAMClientCallbackHandler.
After sending the authentication payload, the client transitions to state RECEIVE_SENDER_RESPONSE.
Once it receives a successful response from the server, the client transitions to the state completed.
A failure at any intermediate step transitions the client to a FAILED state.| Modifier and Type | Class and Description |
|---|---|
static class |
IAMSaslClient.ClassLoaderAwareIAMSaslClientFactory |
static class |
IAMSaslClient.IAMSaslClientFactory |
| Constructor and Description |
|---|
IAMSaslClient(@NonNull java.lang.String mechanism,
@NonNull javax.security.auth.callback.CallbackHandler cbh,
@NonNull java.lang.String serverName,
@NonNull software.amazon.msk.auth.iam.internals.SignedPayloadGenerator payloadGenerator) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
byte[] |
evaluateChallenge(byte[] challenge) |
java.lang.String |
getMechanismName() |
static java.lang.String |
getMechanismNameForClassLoader(java.lang.ClassLoader classLoader) |
java.lang.Object |
getNegotiatedProperty(java.lang.String propName) |
java.lang.String |
getResponseRequestId() |
boolean |
hasInitialResponse() |
boolean |
isComplete() |
byte[] |
unwrap(byte[] incoming,
int offset,
int len) |
byte[] |
wrap(byte[] outgoing,
int offset,
int len) |
public IAMSaslClient(@NonNull
@NonNull java.lang.String mechanism,
@NonNull
@NonNull javax.security.auth.callback.CallbackHandler cbh,
@NonNull
@NonNull java.lang.String serverName,
@NonNull
@NonNull software.amazon.msk.auth.iam.internals.SignedPayloadGenerator payloadGenerator)
public java.lang.String getMechanismName()
getMechanismName in interface javax.security.sasl.SaslClientpublic boolean hasInitialResponse()
hasInitialResponse in interface javax.security.sasl.SaslClientpublic byte[] evaluateChallenge(byte[] challenge)
throws javax.security.sasl.SaslException
evaluateChallenge in interface javax.security.sasl.SaslClientjavax.security.sasl.SaslExceptionpublic boolean isComplete()
isComplete in interface javax.security.sasl.SaslClientpublic byte[] unwrap(byte[] incoming,
int offset,
int len)
throws javax.security.sasl.SaslException
unwrap in interface javax.security.sasl.SaslClientjavax.security.sasl.SaslExceptionpublic byte[] wrap(byte[] outgoing,
int offset,
int len)
throws javax.security.sasl.SaslException
wrap in interface javax.security.sasl.SaslClientjavax.security.sasl.SaslExceptionpublic java.lang.Object getNegotiatedProperty(java.lang.String propName)
getNegotiatedProperty in interface javax.security.sasl.SaslClientpublic void dispose()
throws javax.security.sasl.SaslException
dispose in interface javax.security.sasl.SaslClientjavax.security.sasl.SaslExceptionpublic java.lang.String getResponseRequestId()
public static java.lang.String getMechanismNameForClassLoader(java.lang.ClassLoader classLoader)