simple login via minecraft (server component / spigot plugin)
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
kami 2569683cb6 Merge branch 'master' of Suce/mc-oauth into master pirms 6 mēnešiem
.docker Merge branch 'master' of Suce/mc-oauth into master pirms 6 mēnešiem
OauthPlugin init pirms 7 mēnešiem
api changed api to reflect whitelist.json pirms 7 mēnešiem
.drone.yml init pirms 7 mēnešiem
.gitignore Add player.csv pirms 7 mēnešiem
CHANGELOG.md modified mcserver to run on alpine-slim pirms 7 mēnešiem
LICENSE added license pirms 7 mēnešiem
README.md modified mcserver to run on alpine-slim pirms 7 mēnešiem
RELEASE.md modified mcserver to run on alpine-slim pirms 7 mēnešiem
docker-compose.yml Add player.csv pirms 7 mēnešiem

README.md

mc-oauth

This isnt technically oauth but oh well.

Compatible with Minecraft Client 1.7.X to 1.14.X and further through ViaVersion.
This server and plugin are meant to verify that an mc user exists and is valid.
Inspired by https://mc-oauth.net/. Head over to their description, seriously its a lot better.

Docker

We include a Docker setup out of the box with no configuration needed so you can just deploy this and forget about it.

Requirements

  1. (Optional) Edit docker-compose.yml to your likings for the port mappings.
  2. Run docker-compose up -d in the project root.

Releases

Dependencies

Optional (if building Spigot)

  • Java (any version that can build Spigot, 8 is recommended)

Optional (if building API Server)

  • Go

Optional (but required by Spigot AND API Server)

  • Git

Optional (if building OauthPlugin)

  • Maven

Prerequesites

Build Spigot

curl -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
  • Build spigot.jar in version 1.8.X (here 1.8.8 but any will work fine)
java -Xmx1024M -jar BuildTools.jar --rev 1.8.8

Install Plugins

  • Install into /plugins ViaVersion
  • (Optional to support Minecraft Clients 1.7.X) Install into /plugins ViaRewind

Get OauthPlugin

Install into /plugins, either

  • build via mvn package (project at OauthPlugin)
  • install release from releases

API Server

Dependencies

go get github.com/gorilla/mux

Install

Build server.go, either

  • go build server.go
  • install release from releases

Start service

  • start spigot (make sure that all plugins are installed!)
java -jar spigot-1.8.jar
  • start api server
./server

API

Server will per default attach to port 80 (please use port forwarding in production).

GET /api/{token}

Response:

{"uuid":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","name":"lolthisalegituser"}

or none

License

MIT © Felix Soederhuyzen