summary refs log tree commit diff stats
path: root/src/main/java/ganarchy/friendcode/sam/I2PSamAuthUtil.java
blob: fad222c406f55772c1bfd5ca60e025c020addc53 (plain) (blame)
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
package ganarchy.friendcode.sam;

/**
* Helper for I2P SAM authentication.
*/
public class I2PSamAuthUtil {
    /**
    * Returns the currently active SAM auth pair.
    */
    public static AuthenticationPair getAuthPair() {
        return new AuthenticationPair("minecraft_friendcode", "friendcode");
    }

    /**
    * Generates and stores a modern auth pair.
    *
    * @return The generated auth pair.
    */
    public static AuthenticationPair upgradeAuthPair() {
        return new AuthenticationPair("minecraft_friendcode", "friendcode");
    }

    /**
    * Returns whether strong auth is enabled.
    */
    public static boolean isStrongAuth() {
        return false;
    }

    public record AuthenticationPair(String user, String password) {
    }
}