| Modifier and Type | Class and Description |
|---|---|
| public class | ScramSession.ClientFinalProcessor
Processor that allows to generate the client-final-message, as well as process the server-final-message and verify server's signature. |
| public class | ScramSession.ServerFirstProcessor
Process a received server-first-message. |
| Modifier and Type | Field and Description |
|---|---|
| private ClientFirstMessage | |
| private final String | |
| private final ScramMechanism | |
| private String | |
| private final StringPreparation | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | ScramSession(ScramMechanism
The SCRAM mechanism that will be using this client scramMechanism, StringPreparation stringPreparation, String user, String nonce)Constructs a SCRAM client, to perform an authentication for a given user. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The messageThe channel binding flag gs2CbindFlag, String The channel binding algorithm name, if channel binding is supported, or null cbindName, String The optional authzid)Returns the text representation of a SCRAM client-first-message, with the GSS-API header values indicated. |
| public String | Returns: The messageReturns the text representation of a SCRAM client-first-message, with no channel binding nor authzid. |
| public ScramSession. | Returns: The handlerThe message serverFirstMessage)Constructs a handler for the server-first-message, from its String representation. |
| private String |
| clientFirstMessage | back to summary |
|---|---|
| private ClientFirstMessage clientFirstMessage | |
| nonce | back to summary |
|---|---|
| private final String nonce | |
| scramMechanism | back to summary |
|---|---|
| private final ScramMechanism scramMechanism | |
| serverFirstMessageString | back to summary |
|---|---|
| private String serverFirstMessageString | |
| stringPreparation | back to summary |
|---|---|
| private final StringPreparation stringPreparation | |
| user | back to summary |
|---|---|
| private final String user | |
| ScramSession | back to summary |
|---|---|
| public ScramSession(ScramMechanism scramMechanism, StringPreparation stringPreparation, String user, String nonce) Constructs a SCRAM client, to perform an authentication for a given user.
This class can be instantiated directly,
but it is recommended that a
| |
| clientFirstMessage | back to summary |
|---|---|
| public String clientFirstMessage(Gs2CbindFlag gs2CbindFlag, String cbindName, String authzid) Returns the text representation of a SCRAM client-first-message, with the GSS-API header values indicated.
| |
| clientFirstMessage | back to summary |
|---|---|
| public String clientFirstMessage() Returns the text representation of a SCRAM client-first-message, with no channel binding nor authzid.
| |
| receiveServerFirstMessage | back to summary |
|---|---|
| public ScramSession. Constructs a handler for the server-first-message, from its String representation.
| |
| setAndReturnClientFirstMessage | back to summary |
|---|---|
| private String setAndReturnClientFirstMessage(ClientFirstMessage clientFirstMessage) | |
ServerFirstProcessor#clientFinalProcessor(String)
or ServerFirstProcessor#clientFinalProcessor(byte[], byte[]).
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private final byte[] | |
| private final String | |
| private final byte[] | |
| private final byte[] |
| Access | Constructor and Description |
|---|---|
| private | |
| private | |
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private String | Returns: The messageThe bytes of the channel-binding data cbindData)Generates the SCRAM representation of the client-final-message, including the given channel-binding data. |
| public String | Returns: The messageGenerates the SCRAM representation of the client-final-message. |
| private synchronized void | |
| public void | receiveServerFinalMessage(String
The received server-final-message serverFinalMessage)Receive and process the server-final-message. |
| authMessage | back to summary |
|---|---|
| private String authMessage | |
| clientKey | back to summary |
|---|---|
| private final byte[] clientKey | |
| nonce | back to summary |
|---|---|
| private final String nonce | |
| serverKey | back to summary |
|---|---|
| private final byte[] serverKey | |
| storedKey | back to summary |
|---|---|
| private final byte[] storedKey | |
| ClientFinalProcessor | back to summary |
|---|---|
| private ClientFinalProcessor(String nonce, byte[] clientKey, byte[] storedKey, byte[] serverKey) | |
| ClientFinalProcessor | back to summary |
|---|---|
| private ClientFinalProcessor(String nonce, byte[] clientKey, byte[] serverKey) | |
| ClientFinalProcessor | back to summary |
|---|---|
| private ClientFinalProcessor(String nonce, byte[] saltedPassword) | |
| ClientFinalProcessor | back to summary |
|---|---|
| private ClientFinalProcessor(String nonce, String password, String salt, int iteration) | |
| clientFinalMessage | back to summary |
|---|---|
| private String clientFinalMessage(byte[] cbindData) throws IllegalArgumentException Generates the SCRAM representation of the client-final-message, including the given channel-binding data.
| |
| clientFinalMessage | back to summary |
|---|---|
| public String clientFinalMessage() Generates the SCRAM representation of the client-final-message.
| |
| generateAndCacheAuthMessage | back to summary |
|---|---|
| private synchronized void generateAndCacheAuthMessage(byte[] cbindData) | |
| receiveServerFinalMessage | back to summary |
|---|---|
| public void receiveServerFinalMessage(String serverFinalMessage) throws ScramParseException, ScramServerErrorException, ScramInvalidServerSignatureException, IllegalArgumentException Receive and process the server-final-message. Server SCRAM signatures is verified.
| |
receiveServerFirstMessage(String).
| Modifier and Type | Field and Description |
|---|---|
| private final ServerFirstMessage |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ScramSession. | Returns: The handlerThe user's password password)Generates a |
| public ScramSession. | Returns: The handlerThe client key, as per the SCRAM algorithm.
It can be generated with:
clientKey, byte[] ScramFunctions#clientKey(ScramMechanism, StringPreparation, String, byte[], int)The stored key, as per the SCRAM algorithm.
It can be generated from the client key with:
storedKey)ScramFunctions#storedKey(ScramMechanism, byte[])Generates a |
| public int | |
| public String |
| serverFirstMessage | back to summary |
|---|---|
| private final ServerFirstMessage serverFirstMessage | |
| ServerFirstProcessor | back to summary |
|---|---|
| private ServerFirstProcessor(String receivedServerFirstMessage) throws ScramParseException | |
| clientFinalProcessor | back to summary |
|---|---|
| public ScramSession. Generates a
| |
| clientFinalProcessor | back to summary |
|---|---|
| public ScramSession. Generates a
| |
| getIteration | back to summary |
|---|---|
| public int getIteration() | |
| getSalt | back to summary |
|---|---|
| public String getSalt() | |