Package com.iizix.server.client
Class ClientParams
java.lang.Object
com.iizix.server.client.ClientParams
Class used to hold the information for the client parameters and to parse the Query string in the Client WebSocket URI.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AppFactoryThe application to use, null if not found.final StringThe Application ID, null if not found.final StringThe error message, null for OK.final StringThe user hash when the user is returning.final StringThe original query.static final StringThe Server configuration environment property: "env".The session user identifier, null if not defined properly.Constructor Summary
ConstructorsConstructorDescriptionClientParams(ServerShell server, String query) Constructor with public key required from remote party.ClientParams(ServerShell server, String query, boolean doRequireKey) Constructor.Method Summary
Modifier and TypeMethodDescriptionvoidappendPublicKey(SendTransaction trans) Appends the server public key for the Diffie-Hellman key exchange with the client.assignSessionID(String sessionID) Assigns a new Session ID for this session.getParameterValue(String name) Gets a property that is defined as the "other" properties, e.g.toString()Returns a string representation of this client parameters and its values.final StringupdatePassword(ReadTransaction trans) Updates the instance with the encrypted password in the transaction from a client.
Field Details
SERVER_CONFIGURATION_ENVIRONMENT
The Server configuration environment property: "env".- See Also:
query
The original query.error
The error message, null for OK.appID
The Application ID, null if not found.app
The application to use, null if not found.user
The session user identifier, null if not defined properly.hash
The user hash when the user is returning.
Constructor Details
ClientParams
Constructor with public key required from remote party.- Parameters:
server- The server instance.query- The Query string from the URI.
ClientParams
Constructor.- Parameters:
server- The server instance.query- The Query string from the URI.doRequireKey- Public key required in "&k=" parameter and Application ID in "&app=".
Method Details
assignSessionID
Assigns a new Session ID for this session. This changes theuserinstance to a newSessionUserIdentifierinstance.- Parameters:
sessionID- The session ID.- Returns:
- The new SessionUserIdentifier.
appendPublicKey
Appends the server public key for the Diffie-Hellman key exchange with the client.- Parameters:
trans- The transaction.
updatePassword
public final String updatePassword(ReadTransaction trans) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException, InvalidAlgorithmParameterException Updates the instance with the encrypted password in the transaction from a client.- Parameters:
trans- The transaction.- Returns:
- The password.
- Throws:
IllegalArgumentException- If the password encoding is invalid.UnsupportedEncodingException- If the named charset is not supported.BadPaddingExceptionIllegalBlockSizeExceptionNoSuchPaddingExceptionNoSuchAlgorithmExceptionInvalidKeyExceptionInvalidAlgorithmParameterException
getParameterValue
Gets a property that is defined as the "other" properties, e.g.SERVER_CONFIGURATION_ENVIRONMENTfor server configuration environment.- Parameters:
name- The parameter name, e.g. "env".- Returns:
- The defined parameter value, or null if undefined.
toString
Returns a string representation of this client parameters and its values.