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, access_token: String) 🔗
Signal emitted when a JWT is received.
Property Descriptions¶
bool get_connected()
Client connected state.
String discord_embedded_app/path = "blazium/login/connect"
🔗
Set to what path this client should use when connecting to the discord embedded app.
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.
For discord embedded app environment, replaces the url with client_id.discordsays.com/.proxy/blazium/login/connect if left default, where client_id is the client id from the discord embedded app url (automatically detected).
Method Descriptions¶
LoginResponse connect_to_server() 🔗
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.
Returns a LoginResponse object that has a LoginResponse.finished signal that is emitted when finished.
void disconnect_from_server() 🔗
Disconnect from the server.
Needs connect_to_server to be called first.
Generates disconnected_from_server when disconnected.
LoginResponse request_login_info(login_type: String) 🔗
Request login info using the login type specified.
Needs connect_to_server to be called first.
Returns a LoginResponse object that has a LoginResponse.finished signal that is emitted when finished.