Class AuthenticateWithPasswordRequest
java.lang.Object
io.openems.common.jsonrpc.base.JsonrpcMessage
io.openems.common.jsonrpc.base.AbstractJsonrpcRequest
io.openems.common.jsonrpc.base.JsonrpcRequest
io.openems.common.jsonrpc.request.AuthenticateWithPasswordRequest
Represents a JSON-RPC Request to authenticate with a Password.
This is used by UI to login with username + password at Edge or Backend.
{ "jsonrpc": "2.0", "id": "UUID", "method": "authenticateWithPassword", "params": { "username"?: string, "password": string } }
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
final String
The Password.The Username if given.Fields inherited from class io.openems.common.jsonrpc.base.JsonrpcRequest
DEFAULT_TIMEOUT_SECONDS, id, NO_TIMEOUT, timeoutOpt
Fields inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
JSONRPC_VERSION
-
Constructor Summary
ConstructorDescriptionAuthenticateWithPasswordRequest
(Optional<String> usernameOpt, String password) -
Method Summary
Modifier and TypeMethodDescriptionCreateAuthenticateWithPasswordRequest
from a templateJsonrpcRequest
.com.google.gson.JsonObject
Gets the paramsJsonObject
of theJsonrpcRequest
.Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcRequest
getId, getTimeout, toJsonObject
Methods inherited from class io.openems.common.jsonrpc.base.AbstractJsonrpcRequest
getFullyQualifiedMethod, getMethod
Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
from, from, toString
-
Field Details
-
METHOD
- See Also:
-
usernameOpt
The Username if given. -
password
The Password.
-
-
Constructor Details
-
AuthenticateWithPasswordRequest
-
-
Method Details
-
from
public static AuthenticateWithPasswordRequest from(JsonrpcRequest r) throws OpenemsError.OpenemsNamedException CreateAuthenticateWithPasswordRequest
from a templateJsonrpcRequest
.- Parameters:
r
- the templateJsonrpcRequest
- Returns:
- the
AuthenticateWithPasswordRequest
- Throws:
OpenemsError.OpenemsNamedException
- on parse error
-
getParams
public com.google.gson.JsonObject getParams()Description copied from class:AbstractJsonrpcRequest
Gets the paramsJsonObject
of theJsonrpcRequest
.- Specified by:
getParams
in classAbstractJsonrpcRequest
- Returns:
- the params as
JsonObject
-