Class AuthenticateResponse
java.lang.Object
io.openems.common.jsonrpc.base.JsonrpcMessage
io.openems.common.jsonrpc.base.JsonrpcResponse
io.openems.common.jsonrpc.base.JsonrpcResponseSuccess
io.openems.common.jsonrpc.response.AuthenticateResponse
Represents a JSON-RPC Response for
AuthenticateWithPasswordRequest
or
AuthenticateWithTokenRequest
.
{ "jsonrpc": "2.0", "id": "UUID", "result": { "token": String, "user":} }invalid reference
AbstractUser#toJsonObject()
-
Field Summary
Fields inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
JSONRPC_VERSION
-
Constructor Summary
ConstructorDescriptionAuthenticateResponse
(UUID id, String token, AbstractUser user, Language language) AuthenticateResponse
(UUID id, String token, AbstractUser user, List<GetEdgesResponse.EdgeMetadata> edges, Language language) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonObject
This method formats theAuthenticateResponse
so that it contains the required information for OpenEMS UI.Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcResponseSuccess
from, toJsonObject
Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcResponse
from, getId
Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
toString
-
Constructor Details
-
AuthenticateResponse
-
AuthenticateResponse
public AuthenticateResponse(UUID id, String token, AbstractUser user, List<GetEdgesResponse.EdgeMetadata> edges, Language language)
-
-
Method Details
-
getResult
public com.google.gson.JsonObject getResult()This method formats theAuthenticateResponse
so that it contains the required information for OpenEMS UI.- Specified by:
getResult
in classJsonrpcResponseSuccess
- Returns:
- a JsonObject with the 'result' property of the response
-