mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 04:32:53 +08:00
Add call for Facebook logins
This commit is contained in:
parent
418422577a
commit
2ff5dbbc1c
@ -1,7 +1,5 @@
|
|||||||
package emu.grasscutter.server.http.dispatch;
|
package emu.grasscutter.server.http.dispatch;
|
||||||
|
|
||||||
import static emu.grasscutter.utils.Language.translate;
|
|
||||||
|
|
||||||
import emu.grasscutter.Grasscutter;
|
import emu.grasscutter.Grasscutter;
|
||||||
import emu.grasscutter.auth.AuthenticationSystem;
|
import emu.grasscutter.auth.AuthenticationSystem;
|
||||||
import emu.grasscutter.auth.OAuthAuthenticator.ClientType;
|
import emu.grasscutter.auth.OAuthAuthenticator.ClientType;
|
||||||
@ -14,6 +12,8 @@ import emu.grasscutter.utils.JsonUtils;
|
|||||||
import io.javalin.Javalin;
|
import io.javalin.Javalin;
|
||||||
import io.javalin.http.Context;
|
import io.javalin.http.Context;
|
||||||
|
|
||||||
|
import static emu.grasscutter.utils.Language.translate;
|
||||||
|
|
||||||
/** Handles requests related to authentication. (aka dispatch) */
|
/** Handles requests related to authentication. (aka dispatch) */
|
||||||
public final class DispatchHandler implements Router {
|
public final class DispatchHandler implements Router {
|
||||||
/**
|
/**
|
||||||
@ -142,6 +142,13 @@ public final class DispatchHandler implements Router {
|
|||||||
Grasscutter.getAuthenticationSystem()
|
Grasscutter.getAuthenticationSystem()
|
||||||
.getOAuthAuthenticator()
|
.getOAuthAuthenticator()
|
||||||
.handleTokenProcess(AuthenticationSystem.fromExternalRequest(ctx)));
|
.handleTokenProcess(AuthenticationSystem.fromExternalRequest(ctx)));
|
||||||
|
javalin.get(
|
||||||
|
"/sdkFacebookLogin.html",
|
||||||
|
ctx ->
|
||||||
|
Grasscutter.getAuthenticationSystem()
|
||||||
|
.getOAuthAuthenticator()
|
||||||
|
.handleRedirection(
|
||||||
|
AuthenticationSystem.fromExternalRequest(ctx), ClientType.DESKTOP));
|
||||||
javalin.get(
|
javalin.get(
|
||||||
"/Api/twitter_login",
|
"/Api/twitter_login",
|
||||||
ctx ->
|
ctx ->
|
||||||
|
Loading…
Reference in New Issue
Block a user