MCMSAL

MinecraftMicrosoft Authentication Library for Java 8+, adapted from MiniLauncher code (Java 11).

Лицензия

Лицензия

Группа

Группа

fr.flowarg
Идентификатор

Идентификатор

mcmsal
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

pom.sha512
Описание

Описание

MCMSAL
MinecraftMicrosoft Authentication Library for Java 8+, adapted from MiniLauncher code (Java 11).
Ссылка на сайт

Ссылка на сайт

https://github.com/FlowArg/MCMSAL
Система контроля версий

Система контроля версий

http://github.com/FlowArg/MCMSAL/tree/master

Скачать mcmsal

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.googlecode.json-simple : json-simple jar 1.1.1
fr.flowarg : flowmultitools jar 1.2.4

Модули Проекта

Данный проект не имеет модулей.

version

MCMSAL

MinecraftMicrosoft Authentication Library for Java 8+, adapted from MiniLauncher code (Java 11)

Installation

Gradle

In your block repositories, add this lines :

repositories {
    mavenCentral()
}

and in your dependencies block :

dependencies {
    implementation 'fr.flowarg:mcmsal:VERSION'
}

Maven

<dependencies>
    <dependency>
      <groupId>fr.flowarg</groupId>
      <artifactId>mcmsal</artifactId>
      <version>VERSION</version>
    </dependency>
</dependencies>

Usage

Using JavaFX

There is a class named JFXAuth who can help you to use auth with Microsoft account (using a webview). There is an example :

    // in a class
    private GridPane layout;


    // in a method
    JFXAuth.authenticateWithWebView(new JFXAuthCallback() {

        @Override
        public void beforeAuth(WebView webView)
        {
            MyClass.this.layout.getChildren().add(webView);
        }

        @Override
        public void webViewCanBeClosed(WebView webView)
        {
            MyClass.this.layout.getChildren().remove(webView);
        }

        @Override
        public Consumer<AuthInfo> onAuthFinished()
        {
            return (authInfo) -> {
                System.out.println(authInfo);
                // another actions
            };
        }

        @Override
        public void exceptionCaught(MCMSALException e)
        {
            e.printStackTrace();
        }

        @Override
        public double prefWidth()
        {
            return 405;
        }

        @Override
        public double prefHeight()
        {
            return 405;
        }
})

Using Swing

There is no class who can help you to auth directly with swing. If you've found a solution, please make a pull request. If you have the authCode, you can use directly MicrosoftAuthentication#authenticate(String, Consumer<AuthInfo>) method.

Версии библиотеки

Версия
1.0.0