Package org.wildfly.security.sasl.entity
Class EntitySaslClient
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractSaslParticipant
-
- org.wildfly.security.sasl.util.AbstractSaslClient
-
- org.wildfly.security.sasl.entity.EntitySaslClient
-
- All Implemented Interfaces:
SaslClient
,SaslWrapper
final class EntitySaslClient extends AbstractSaslClient
SaslClient for the ISO/IEC 9798-3 authentication mechanism as defined by RFC 3163.- Author:
- Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description private X509Certificate[]
clientCertChain
private boolean
mutual
private byte[]
randomA
private byte[]
randomB
private SecureRandom
secureRandom
private String
serverName
private Signature
signature
private static int
ST_CHALLENGE_RESPONSE
private static int
ST_RESPONSE_SENT
-
Fields inherited from class org.wildfly.security.sasl.util.AbstractSaslParticipant
COMPLETE_STATE, FAILED_STATE, NO_BYTES
-
Fields inherited from interface org.wildfly.security.sasl.util.SaslWrapper
IDENTITY
-
-
Constructor Summary
Constructors Constructor Description EntitySaslClient(String mechanismName, boolean mutual, Signature signature, SecureRandom secureRandom, String protocol, String serverName, CallbackHandler callbackHandler, String authorizationId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Dispose of this participant.protected byte[]
evaluateMessage(int state, byte[] challenge)
private X509Certificate
getClientCertificate()
void
init()
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractSaslClient
evaluateChallenge, getAuthorizationId, hasInitialResponse
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractSaslParticipant
assertComplete, evaluateMessage, getCallbackHandler, getIntProperty, getMechanismName, getNegotiatedProperty, getProtocol, getServerName, getStringProperty, getWrapper, handleCallbacks, isComplete, negotiationComplete, setNegotiationState, setWrapper, tryHandleCallbacks, unwrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.security.sasl.SaslClient
getMechanismName, getNegotiatedProperty, isComplete, unwrap, wrap
-
-
-
-
Field Detail
-
ST_CHALLENGE_RESPONSE
private static final int ST_CHALLENGE_RESPONSE
- See Also:
- Constant Field Values
-
ST_RESPONSE_SENT
private static final int ST_RESPONSE_SENT
- See Also:
- Constant Field Values
-
secureRandom
private final SecureRandom secureRandom
-
signature
private final Signature signature
-
mutual
private final boolean mutual
-
serverName
private final String serverName
-
randomA
private byte[] randomA
-
randomB
private byte[] randomB
-
clientCertChain
private X509Certificate[] clientCertChain
-
-
Constructor Detail
-
EntitySaslClient
EntitySaslClient(String mechanismName, boolean mutual, Signature signature, SecureRandom secureRandom, String protocol, String serverName, CallbackHandler callbackHandler, String authorizationId)
-
-
Method Detail
-
init
public void init()
- Overrides:
init
in classAbstractSaslParticipant
-
evaluateMessage
protected byte[] evaluateMessage(int state, byte[] challenge) throws SaslException
- Specified by:
evaluateMessage
in classAbstractSaslParticipant
- Throws:
SaslException
-
dispose
public void dispose() throws SaslException
Description copied from class:AbstractSaslParticipant
Dispose of this participant.- Specified by:
dispose
in interfaceSaslClient
- Overrides:
dispose
in classAbstractSaslParticipant
- Throws:
SaslException
- if disposal failed
-
getClientCertificate
private X509Certificate getClientCertificate() throws SaslException
- Throws:
SaslException
-
-