OAuthAuthenticator.java 810 Bytes
Newer Older
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
package emu.grasscutter.auth;

import emu.grasscutter.auth.AuthenticationSystem.AuthenticationRequest;

/**
 * Handles authentication via OAuth routes.
 */
public interface OAuthAuthenticator {

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

    /**
     * Called when an client requests to redirect to login page.
     * @param request The authentication request.
     */
    void handleDesktopRedirection(AuthenticationRequest request);
    void handleMobileRedirection(AuthenticationRequest request);

    /**
     * Called when an OAuth login requests callback.
     * @param request The authentication request.
     */
    void handleTokenProcess(AuthenticationRequest request);
}