/TheAlteningAuth4j

Minecraft authentication library that supports TheAltening

Primary LanguageJavaGNU Lesser General Public License v3.0LGPL-3.0

The Altening Auth API

Java 8+ Maven Central

GitHub license

TheAltening Auth API made by Vladymyr now branded under the official repo

Please use the version x.x.x-j9 if you are running Java 10 and above, otherwise just stick to x.x.x version.

Gradle

repositories {
	mavenCentral()
}
dependencies {
	implementation 'com.thealtening.auth:auth:@BADGE-VERSION@'
}

Maven

<dependencies>
	<dependency>
		<groupId>com.thealtening.auth</groupId>
		<artifactId>auth</artifactId>
		<version>@BADGE-VERSION@</version>
	</dependency>
</dependencies>

Prerequisites

  • Use JDK 1.8+

Usage

  1. Create a new TheAlteningAuthentication instance depending on the service wanted:
import com.thealtening.auth.TheAlteningAuthentication

TheAlteningAuthentication mojang = TheAlteningAuthentication.mojang();
TheAlteningAuthentication theAltening = TheAlteningAuthentication.theAltening();
  1. In case that you want to switch to another service, use the updateService method from your auth instance.
theAlteningAuth.updateService(AlteningServiceType.MOJANG);
theAlteningAuth.updateService(AlteningServiceType.THEALTENING);

Note: if the given service type is null or the same as the current, no change will be made.