ExternalAuthenticator.java 1.16 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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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.
     *                
     * For developers: Use {@link AuthenticationRequest#getRequest()} to get the request body.
     *                 Use {@link AuthenticationRequest#getResponse()} to get the response body.
     */
    void handleAccountCreation(AuthenticationRequest request);

    /**
     * Called when an external password reset request is made.
     * @param request The authentication request.
     *                
     * For developers: Use {@link AuthenticationRequest#getRequest()} to get the request body.
     *                 Use {@link AuthenticationRequest#getResponse()} to get the response body.
     */
    void handlePasswordReset(AuthenticationRequest request);
}