Implement Mojang authentication #4
@ -113,7 +113,7 @@ defmodule Amethyst.ConnectionState.Login do
|
||||
hash = Amethyst.Minecraft.Sha1.hash(secret <> pubkey)
|
||||
url = Application.get_env(:amethyst, :session_server, "https://sessionserver.mojang.com") <> "/session/minecraft/hasJoined?username=" <>
|
||||
Map.get(state, :name) <> "&serverId=" <> hash # I don't think we need to verify the IP in the use case of Amethyst...
|
||||
Logger.debug(url)
|
||||
|
||||
response = Req.get!(url,
|
||||
headers: [
|
||||
{"user-agent", "Amethyst/1.0"}
|
||||
|
Loading…
Reference in New Issue
Block a user