Package com.ongres.scram.client
Class ScramClient.PreBuilder2
- java.lang.Object
-
- com.ongres.scram.client.ScramClient.PreBuilder1
-
- com.ongres.scram.client.ScramClient.PreBuilder2
-
- Direct Known Subclasses:
ScramClient.Builder
- Enclosing class:
- ScramClient
public static class ScramClient.PreBuilder2 extends ScramClient.PreBuilder1
This class is not meant to be used directly. UseScramClient.channelBinding(ChannelBinding)
.{#stringPreparation(StringPreparation)} instead.
-
-
Field Summary
Fields Modifier and Type Field Description protected ScramMechanism
channelBindingMechanism
protected ScramMechanism
nonChannelBindingMechanism
protected StringPreparation
stringPreparation
-
Fields inherited from class com.ongres.scram.client.ScramClient.PreBuilder1
channelBinding
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScramClient.Builder
selectClientMechanism(ScramMechanism scramMechanism)
Select a fixed client mechanism.ScramClient.Builder
selectMechanismBasedOnServerAdvertised(String... serverMechanisms)
Inform the client of the SCRAM mechanisms supported by the server.ScramClient.Builder
selectMechanismBasedOnServerAdvertisedCsv(String serverMechanismsCsv)
Inform the client of the SCRAM mechanisms supported by the server.-
Methods inherited from class com.ongres.scram.client.ScramClient.PreBuilder1
stringPreparation
-
-
-
-
Field Detail
-
stringPreparation
protected final StringPreparation stringPreparation
-
nonChannelBindingMechanism
protected ScramMechanism nonChannelBindingMechanism
-
channelBindingMechanism
protected ScramMechanism channelBindingMechanism
-
-
Method Detail
-
selectMechanismBasedOnServerAdvertised
public ScramClient.Builder selectMechanismBasedOnServerAdvertised(String... serverMechanisms)
Inform the client of the SCRAM mechanisms supported by the server. Based on this list, the channel binding settings previously specified, and the relative strength of the supported SCRAM mechanisms for this client, the client will have enough data to select which mechanism to use for future interactions with the server. All names provided here need to be standar IANA Registry names for SCRAM mechanisms, or will be ignored.- Parameters:
serverMechanisms
- One or more IANA-registered SCRAM mechanism names, as advertised by the server- Throws:
IllegalArgumentException
- If no server mechanisms are provided- See Also:
- SASL SCRAM Family Mechanisms
-
selectMechanismBasedOnServerAdvertisedCsv
public ScramClient.Builder selectMechanismBasedOnServerAdvertisedCsv(String serverMechanismsCsv) throws IllegalArgumentException
Inform the client of the SCRAM mechanisms supported by the server. CallsselectMechanismBasedOnServerAdvertised(String...)
with the results of splitting the received comma-separated values.- Parameters:
serverMechanismsCsv
- A CSV (Comma-Separated Values) String, containining all the SCRAM mechanisms supported by the server- Throws:
IllegalArgumentException
- If selectMechanismBasedOnServerAdvertisedCsv is null
-
selectClientMechanism
public ScramClient.Builder selectClientMechanism(ScramMechanism scramMechanism)
Select a fixed client mechanism. It must be compatible with the channel binding selection previously performed. If automatic selection based on server advertised mechanisms is preferred, please use methodsselectMechanismBasedOnServerAdvertised(String...)
orselectMechanismBasedOnServerAdvertisedCsv(String)
.- Parameters:
scramMechanism
- The selected scram mechanism- Throws:
IllegalArgumentException
- If the selected mechanism is null or not compatible with the prior channel binding selection, or channel binding selection is dependent on the server advertised methods
-
-