Implement Mojang authentication #4

Merged
kodi merged 5 commits from auth into main 2024-10-07 11:26:31 +02:00
Showing only changes of commit 4ecf2d432f - Show all commits

View File

@ -127,7 +127,7 @@ defmodule Amethyst.ConnectionState.Login do
uuid: uuid, uuid: uuid,
username: response["name"], username: response["name"],
properties: response["properties"] |> properties: response["properties"] |>
Enum.map(fn prop -> %{name: prop["name"], value: prop["value"], signature: Map.get(prop, "signature") |> Base.decode64!} end), Enum.map(fn prop -> %{name: prop["name"], value: prop["value"], signature: Map.get(prop, "signature")} end),
strict_error_handling: true strict_error_handling: true
}}) }})
Map.put(state, :authenticated, true) Map.put(state, :authenticated, true)