Package com.ongres.scram.client
Class ScramSession.ClientFinalProcessor
- java.lang.Object
-
- com.ongres.scram.client.ScramSession.ClientFinalProcessor
-
- Enclosing class:
- ScramSession
public class ScramSession.ClientFinalProcessor extends Object
Processor that allows to generate the client-final-message, as well as process the server-final-message and verify server's signature. Generate the processor by calling eitherScramSession.ServerFirstProcessor.clientFinalProcessor(String)
orScramSession.ServerFirstProcessor.clientFinalProcessor(byte[], byte[])
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
clientFinalMessage()
Generates the SCRAM representation of the client-final-message.String
clientFinalMessage(byte[] cbindData)
Generates the SCRAM representation of the client-final-message, including the given channel-binding data.void
receiveServerFinalMessage(String serverFinalMessage)
Receive and process the server-final-message.
-
-
-
Method Detail
-
clientFinalMessage
public String clientFinalMessage(byte[] cbindData) throws IllegalArgumentException
Generates the SCRAM representation of the client-final-message, including the given channel-binding data.- Parameters:
cbindData
- The bytes of the channel-binding data- Returns:
- The message
- Throws:
IllegalArgumentException
- If the channel binding data is null
-
clientFinalMessage
public String clientFinalMessage()
Generates the SCRAM representation of the client-final-message.- Returns:
- The message
-
receiveServerFinalMessage
public void receiveServerFinalMessage(String serverFinalMessage) throws ScramParseException, ScramServerErrorException, ScramInvalidServerSignatureException, IllegalArgumentException
Receive and process the server-final-message. Server SCRAM signatures is verified.- Parameters:
serverFinalMessage
- The received server-final-message- Throws:
ScramParseException
- If the message is not a valid server-final-messageScramServerErrorException
- If the server-final-message contained an errorIllegalArgumentException
- If the message is null or emptyScramInvalidServerSignatureException
-
-