Class Login


  • public class Login
    extends Object
    • Constructor Detail

      • Login

        public Login()
    • Method Detail

      • execute

        public static void execute​(String username,
                                   String password,
                                   String totpSecret)
        Executes the login process with the specified credentials and optional TOTP secret.

        The method supports two modes of login:

        • Standard username and password login.
        • Jagex account login (indicated by a character id starting with * and a session id in place of password).
        If a TOTP secret is provided, it generates a one-time password (OTP) using the Time-Based One-Time Password (TOTP) algorithm and submits it as part of the login process.

        Parameters:
        username - the username for the account, or *JX_CHARACTER_ID for a Jagex account login
        password - the password for the account or JX_SESSION_ID for a Jagex account login
        totpSecret - the TOTP secret for two-factor authentication, or an empty string if not applicable