ExternalAuthenticator.java 1.1 KB
Newer Older
KingRainbow44's avatar
KingRainbow44 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package emu.grasscutter.auth;

import emu.grasscutter.auth.AuthenticationSystem.AuthenticationRequest;

/**
 * Handles authentication via external routes.
 */
public interface ExternalAuthenticator {

    /**
     * Called when an external login request is made.
     * @param request The authentication request.
     */
    void handleLogin(AuthenticationRequest request);

    /**
     * Called when an external account creation request is made.
     * @param request The authentication request.
19
20
21
     *
     * For developers: Use AuthenticationRequest#getRequest() to get the request body.
     *                 Use AuthenticationRequest#getResponse() to get the response body.
KingRainbow44's avatar
KingRainbow44 committed
22
23
24
25
26
27
     */
    void handleAccountCreation(AuthenticationRequest request);

    /**
     * Called when an external password reset request is made.
     * @param request The authentication request.
28
29
30
     *
     * For developers: Use AuthenticationRequest#getRequest() to get the request body.
     *                 Use AuthenticationRequest#getResponse() to get the response body.
KingRainbow44's avatar
KingRainbow44 committed
31
32
33
     */
    void handlePasswordReset(AuthenticationRequest request);
}