public abstract class SRP6JavascriptServerSession extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected com.nimbusds.srp6.SRP6CryptoParams |
config
The crypto parameters for the SRP-6a protocol.
|
static int |
HASH_HEX_LENGTH
This must match the expected character length of the specified algorithm
|
protected com.nimbusds.srp6.SRP6ServerSession |
session
The underlying Nimbus session which will be configure for JavaScript
interactions
|
| Constructor and Description |
|---|
SRP6JavascriptServerSession(com.nimbusds.srp6.SRP6CryptoParams srp6CryptoParams)
Constructs a JavaScript compatible server session which configures an
underlying Nimbus SRP6ServerSession.
|
| Modifier and Type | Method and Description |
|---|---|
static BigInteger |
fromDecimal(String base10)
Turn a radix10 string into a java.net.BigInteger
|
String |
getPublicServerValue()
Deprecated.
This value is returned by step1 having a getter means holding onto more memory see issue #4 at https://bitbucket.org/simon_massey/thinbus-srp-js/issues/4
|
String |
getSalt()
Deprecated.
This value is returned by step1 having a getter means holding onto more memory see issue #4 at https://bitbucket.org/simon_massey/thinbus-srp-js/issues/4
|
String |
getServerEvidenceMessage()
Deprecated.
This value is returned by step2 having a getter means holding onto more memory see issue #4 at https://bitbucket.org/simon_massey/thinbus-srp-js/issues/4
|
String |
getSessionKey(boolean doHash)
Gets the shared session key 'S' or its hash H(S).
|
String |
getState()
Returns the underlying session state as a String for JavaScript testing.
|
String |
getUserID()
Gets the identity 'I' of the authenticating user.
|
String |
k()
k is actually fixed and done with hash padding routine which uses
java.net.BigInteger byte array constructor so this is a convenience
method to get at the Java generated value to use in the configuration of
the Javascript
|
String |
step1(String username,
String salt,
String v)
Returns the one-time server challenge `B` encoded as hex.
|
String |
step2(String A,
String M1)
Validates a password proof `M1` based on the client one-tiem public key `A`.
|
String |
toString()
Outputs the configuration in the way which can be used to configure
JavaScript.
|
protected final com.nimbusds.srp6.SRP6CryptoParams config
OpenSSLCryptoConfigConverterprotected final com.nimbusds.srp6.SRP6ServerSession session
public static int HASH_HEX_LENGTH
public SRP6JavascriptServerSession(com.nimbusds.srp6.SRP6CryptoParams srp6CryptoParams)
srp6CryptoParams - cryptographic constants which must match those being used by
the client.public String step1(String username, String salt, String v)
SRP6ServerSession.State.STEP_1.username - The identity 'I' of the authenticating user. Must not be
null or empty.salt - The password salt 's'. Must not be null.v - The password verifier 'v'. Must not be null.IllegalStateException - If the mehod is invoked in a state other than
SRP6ServerSession.State.INIT.public String step2(String A, String M1) throws Exception
SRP6ServerSession.State.STEP_2.A - The client public value. Must not be null.M1 - The client evidence message. Must not be null.com.nimbusds.srp6.SRP6Exception - If the client public value 'A' is invalid or the user
credentials are invalid.IllegalStateException - If the mehod is invoked in a state other than
SRP6ServerSession.State.STEP_1.Exceptionpublic String getState()
public String getUserID()
public String k()
public static BigInteger fromDecimal(String base10)
base10 - the radix10 stringpublic String toString()
@Deprecated public String getSalt()
null.@Deprecated public String getPublicServerValue()
null.@Deprecated public String getServerEvidenceMessage()
null.public String getSessionKey(boolean doHash)
doHash - If true the hash H(S) of the session key will be
returned instead of the raw value.null will be
returned if authentication failed or the method is invoked in a
session state when the session key 'S' has not been computed yet.Copyright © 2017. All Rights Reserved.