Authentication Api

Simple API for authenticate with the xbox live authentication system
Alternatives To Authentication Api
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Django_microsoft_auth122
14 months ago25November 09, 202138mitPython
Simple app to enable Microsoft Account, Office 365 and Xbox Live authentcation as a Django authentcation backend.
Xboxlive Auth50112 years ago31July 26, 2021mitTypeScript
A light but advanced Xbox Live authentication module with OAuth2.0 and Electron support.
Xbox Webapi Csharp48
15 months ago10December 29, 20203mitC#
C# Xbox WebAPI, includes support for authentication with Windows Live / Xbox Live
Piggyauth33
5 years ago9apache-2.0PHP
Safe & feature-rich auth plugin. Project has been discontinued
Cmllib.core.auth.microsoft1036 months ago6July 07, 20222mitC#
Minecraft Login with Microsoft Xbox account
Mojangapi8
8 months ago1C#
MojangAPI
Notmexboxliveauth7
2 years agolgpl-3.0PHP
Allow specified players to bypass Xbox Live authentication!
Authentication Api3
2 months agoJava
Simple API for authenticate with the xbox live authentication system
Xboxlive Auth3
a year agomitRust
A program to retrieve a Minecraft account's access token based on the new Microsoft authentication scheme.
Xboxappdemo2
6 years agoPHP
More than an API. A robust authentication platform.
Alternatives To Authentication Api
Select To Compare


Alternative Project Comparisons
Readme

Authentication API

Introduction

This is a simple authentication API for the xbox authentication system. The API uses the OAuth2 protocol to authenticate users by microsoft.

This API supports the minecraft authentication service and the responses.


How to use

First you need a OAuth2.0 client ID. See here to create a ID.
Then follow the docs here to get an access token.

With the following code you can authenticate a user with your access token and login to the XboxLive account. The LoginInToXboxLiveResponse contains several information and the final token. The relyingParty is the application where to authorize the user. For example is the application url from minecraft: rp://api.minecraftservices.com/.

try {
    LoginInToXboxLiveResponse authenticateResponse = AuthenticationAPI.authenticate("<your access token>", "<relyingParty>");
} catch (Exception e) {
    throw new RuntimeException(e);
}

Minecraft Authentication

With the following code can you authorize with the minecraft api. You get information like the bearer token or the players name. The bearer token is useful authorize with the minecraft api website to get more information about the minecraft account.

See here for the list of the features of the minecraft web api.

try {
    MinecraftProfileResponse profileResponse = HTTPUtils.authenticateWithToken("https://api.minecraftservices.com/minecraft/profile", authenticateResponse.accessToken, MinecraftProfileResponse.class);
    String token = profileResponse.name; 
} catch(Exception e) {
    throw new RuntimeException(e);
}

You can use more features from the minecraft web api. See here for the features that are all implemented in my api. You can see the currently implemented features in this package. Look in the documentations for getting other information about the player.

Example

This example shows how to get the xbox live account username of the player and check if the player has enabled to use the minecraft chat in the xbox live settings.

Use the MinecraftAuthAPI class to get even simpler information about the Minecraft account.

public class TestClass {

    public static void main(String[] args) throws Exception {
        String accessToken = "<your accessToken>"; //See in the #How to use step how to get the accessToken
        LoginInToXboxLiveResponse authenticateResponse = AuthenticationAPI.authenticateWithMinecraft(accessToken); //This method authorize with the xboxlive account with the minecraft RelyingParty url


        MinecraftProfileResponse profileResponse = HTTPUtils.authenticateWithToken("https://api.minecraftservices.com/minecraft/profile", authenticateResponse.accessToken, MinecraftProfileResponse.class);
        System.out.println("Profile Name of the Minecraft account user: " + profileResponse.name);

        //Next we getting the information if the xbox account has enabled that the onlinechat gets showed to the player.
        //I used the documention here https://wiki.vg/Mojang_API#Player_Attributes

        MinecraftPlayerAttributesResponse playerAttributesResponse = HTTPUtils.authenticateWithToken("https://api.minecraftservices.com/player/attributes", authenticateResponse.accessToken, new MinecraftPlayerAttributesResponse.MinecraftPlayerAttributesRequest(false), MinecraftPlayerAttributesResponse.class);
        System.out.println("The setting if the player has the online chat enabled in minecraft: " + playerAttributesResponse.privileges.onlineChat.enabled);
    }
}

Implement the API

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.ZeusSeinGrossopa</groupId>
    <artifactId>Authentication-API</artifactId>
    <version>1.1.0</version>
</dependency>

Gradle

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.ZeusSeinGrossopa:Authentication-API:1.0.0'
}

Documentations


Popular Authentication Projects
Popular Xbox Projects
Popular Security Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Authentication
Api Rest
Minecraft
Json Api
Xbox