GithubHelp home page GithubHelp logo

remainingtoast / mcauthlib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tycrek/mcauthlib

0.0 0.0 0.0 384 KB

A Minecraft authentication library for MCProtocolLib

License: MIT License

Java 100.00%

mcauthlib's Introduction

MCAuthLib (tycrek edition)

Image

A Minecraft authentication library for MCProtocolLib


MCAuthLib is a library for authentication with Minecraft accounts. It is used in projects such as MCProtocolLib to handle authenticating users. Further, projects such as ttRMS use MCProtocolLib for interacting with Minecraft servers & clients.

tycrek edition

I use MCAuthLib (and MCProtocolLib) in one of my other projects, ttRMS. I've made some changes to better suit my needs.

The biggest differences between my repo and the GeyserMC repo are:

  • Project now uses Gradle instead of Maven
  • Target JDK is now Java 16, instead of Java 7
  • My repo utilizes Lombok to reduce manual boilerplate

Generally, users of my fork would be looking for a more modern codebase.

Example code

See example/com/github/steveice10/mc/auth/test/MinecraftAuthTest.java for example usage.

Installing as a dependency

The recommended way of installing MCAuthLib is through JitPack. For more details, see MCAuthLib on JitPack.

Gradle

repositories {
    maven { url 'https://jitpack.io' }
}
dependencies {
    implementation 'com.github.tycrek:MCAuthLib:__version__'
}

Maven

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependency>
    <groupId>com.github.tycrek</groupId>
    <artifactId>MCAuthLib</artifactId>
    <version>__version__</version>
</dependency>

Building the source

MCAuthLib uses Maven to manage dependencies. To build the source code, run mvn clean install in the project root directory. Now uses Gradle, will need to update this section.

Authentication Types

Visit wiki.vg for documentation on Mojang API authentication and Microsoft's API authentication.

AuthenticationService Usage
MojangAuthenticationService Used for authenticating Mojang accounts. Supports regular Mojang accounts (email) and legacy accounts (username).
MsaAuthenticationService Used for authenticating Microsoft accounts.
Device Code auth uses the Microsoft Authentication Library (MSAL) for Java.
Username/password auth uses a custom implementation using a combination of Microsoft, Mojang, and Xbox API's.

Support and development

Please join the GeyserMC Discord server and visit the #mcprotocollib channel for discussion and support for this project.

License

MCAuthLib is licensed under the MIT license.

mcauthlib's People

Contributors

remainingtoast avatar rtm516 avatar redned235 avatar camotoy avatar gaming32 avatar sgdc3 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.