Class ScramServer
- java.lang.Object
-
- org.wildfly.security.mechanism.scram.ScramServer
-
public final class ScramServer extends Object
- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
bindingData
private String
bindingType
private CallbackHandler
callbackHandler
private int
maximumIterationCount
private ScramMechanism
mechanism
private int
minimumIterationCount
private Supplier<Provider[]>
providers
private SecureRandom
random
-
Constructor Summary
Constructors Constructor Description ScramServer(ScramMechanism mechanism, CallbackHandler callbackHandler, SecureRandom random, byte[] bindingData, String bindingType, int minimumIterationCount, int maximumIterationCount, Supplier<Provider[]> providers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScramFinalServerMessage
evaluateFinalClientMessage(ScramInitialServerResult initialResult, ScramFinalClientMessage clientMessage)
ScramInitialServerResult
evaluateInitialResponse(ScramInitialClientMessage clientMessage)
byte[]
getBindingData()
String
getBindingType()
CallbackHandler
getCallbackHandler()
ScramMechanism
getMechanism()
(package private) Random
getRandom()
(package private) byte[]
getRawBindingData()
ScramFinalClientMessage
parseFinalClientMessage(ScramInitialClientMessage initialResponse, ScramInitialServerResult initialResult, byte[] bytes)
ScramInitialClientMessage
parseInitialClientMessage(ChannelBindingCallback bindingCallback, byte[] bytes)
Construct an initial response object from a byte array.
-
-
-
Field Detail
-
mechanism
private final ScramMechanism mechanism
-
callbackHandler
private final CallbackHandler callbackHandler
-
random
private final SecureRandom random
-
bindingData
private final byte[] bindingData
-
bindingType
private final String bindingType
-
minimumIterationCount
private final int minimumIterationCount
-
maximumIterationCount
private final int maximumIterationCount
-
-
Constructor Detail
-
ScramServer
ScramServer(ScramMechanism mechanism, CallbackHandler callbackHandler, SecureRandom random, byte[] bindingData, String bindingType, int minimumIterationCount, int maximumIterationCount, Supplier<Provider[]> providers)
-
-
Method Detail
-
parseInitialClientMessage
public ScramInitialClientMessage parseInitialClientMessage(ChannelBindingCallback bindingCallback, byte[] bytes) throws AuthenticationMechanismException
Construct an initial response object from a byte array.- Parameters:
bindingCallback
- the optional channel binding callback result (may benull
)bytes
- the message bytes (must not benull
)- Returns:
- the constructed initial response (not
null
) - Throws:
AuthenticationMechanismException
- if the content of the message is invalid
-
evaluateInitialResponse
public ScramInitialServerResult evaluateInitialResponse(ScramInitialClientMessage clientMessage) throws AuthenticationMechanismException
- Throws:
AuthenticationMechanismException
-
parseFinalClientMessage
public ScramFinalClientMessage parseFinalClientMessage(ScramInitialClientMessage initialResponse, ScramInitialServerResult initialResult, byte[] bytes) throws AuthenticationMechanismException
- Throws:
AuthenticationMechanismException
-
evaluateFinalClientMessage
public ScramFinalServerMessage evaluateFinalClientMessage(ScramInitialServerResult initialResult, ScramFinalClientMessage clientMessage) throws AuthenticationMechanismException
- Throws:
AuthenticationMechanismException
-
getMechanism
public ScramMechanism getMechanism()
-
getCallbackHandler
public CallbackHandler getCallbackHandler()
-
getRandom
Random getRandom()
-
getBindingData
public byte[] getBindingData()
-
getRawBindingData
byte[] getRawBindingData()
-
getBindingType
public String getBindingType()
-
-