Up to date
This page is up to date for Godot 4.3
.
If you still find outdated information, please open an issue.
LoginClient¶
Inherits: BlaziumClient < Node < Object
Node for connecting to the Blazium Login service. Offers authentication mechanism.
Description¶
The LoginClient node provides an interface for connecting to the Blazium Login service. There is a free instance hosted on the blazium.app domain that is used by default.
The authentication flow is as follows:
Listen to all the signals you are interested in.
Connect to the server using the connect_to_server method.
Then you can request login info using the request_login_info method.
Open the resulting login url received after awaiting on the LoginResponse.finished signal.
Obtain the jwt from the received_jwt signal.
Note: Some methods are non blocking and can be awaited in order to get the result.
Properties¶
|
||
|
||
|
Methods¶
void |
|
request_login_info(login_type: String) |
Signals¶
connected_to_server() 🔗
Signal emitted when the client connects to the server.
disconnected_from_server(reason: String) 🔗
Signal emitted when the client disconnects from the server.
log_updated(command: String, logs: String) 🔗
Signals a log from a command.
received_jwt(jwt: String, type: String) 🔗
Signal emitted when a JWT is received.
Property Descriptions¶
bool get_connected()
Client connected state.
Set what game id this client should use when connecting to the server. If this is missing connection will error.
Can only contain alphanumeric characters.
String server_url = "wss://login.blazium.app/connect"
🔗
Set to what url this client should connect to.
Method Descriptions¶
Connects to the server specified in server_url using the game id specified in game_id. Must be done before requesting login info.
Generates connected_to_server when connected.
void disconnect_from_server() 🔗
Disconnect from the server.
Generates disconnected_from_server when disconnected.
LoginResponse request_login_info(login_type: String) 🔗
Request login info using the login type specified.
Returns a LoginResponse object that has a LoginResponse.finished signal that is emitted when finished.