This project is not affiliated with, endorsed by, or officially maintained by Sejong University.
- About
- Features
- Quickstart
- CLI Usage
- Java API
- Authentication Methods
- Security and Disclaimer
- Documentation
- Contributing
Campus Auth Java wraps session-based campus login checks behind a small Java 11 toolkit. It handles HTTP requests, cookies, redirects, HTML parsing, fallback authentication methods, and structured JSON output so applications can make clear decisions from authentication results.
Use it when you need a local CLI or Java API for authorized campus-account verification experiments, club tools, or research prototypes.
- Multiple authentication strategies: Portal SSO, Classic Session, Moodler Session, and DoSejong Session.
- Manual fallback mode: Try supported methods in order until a definite result is found.
- Structured JSON output: Consistent success, status, result code, authenticator, and metadata fields.
- Library and CLI support: Use from Java code or package a runnable shaded jar.
- Small dependency surface: Java
HttpClientplus JSoup for HTML parsing. - Extensible design: Add new authenticators behind the shared
Authenticatorcontract.
- JDK 11 or newer
- Maven 3.8 or newer
git clone https://github.com/UsmanovMahmudkhan/campus-auth-java.git
cd campus-auth-java
mvn clean packageThe shaded jar is generated at:
target/campus-auth-java-0.2.7.jar
Run automatic fallback mode:
java -jar target/campus-auth-java-0.2.7.jar <student_id> <password>Use the interactive password prompt:
java -jar target/campus-auth-java-0.2.7.jar <student_id>Run one or more selected authenticators:
java -jar target/campus-auth-java-0.2.7.jar <student_id> <password> PortalSSOToken
java -jar target/campus-auth-java-0.2.7.jar <student_id> <password> PortalSSOToken,DosejongSessionimport campus.auth.java.AuthMethod;
import campus.auth.java.AuthResponse;
import campus.auth.java.AuthResult;
import campus.auth.java.AuthService;
public class App {
public static void main(String[] args) {
AuthResult fallback = AuthService.authenticate("student_id", "password");
System.out.println(fallback.toJson());
AuthResponse portal = AuthService.authenticate(
"student_id",
"password",
AuthMethod.PORTAL_SSO_TOKEN
);
System.out.println(portal.getIsAuth());
}
}| Method | Purpose | Extracted Metadata |
|---|---|---|
Manual |
Cascades through supported methods. | Varies by successful method |
PortalSSOToken |
Checks portal SSO token behavior via Blackboard. | Authentication status |
ClassicSession |
Checks Daeyang Humanity College session flow. | Classic reading certification |
MoodlerSession |
Checks SJULMS Moodler session login. | Name, major |
DosejongSession |
Checks Do Sejong session login. | Name, major |
Legacy helper methods remain available in LegacyAuth for backward compatibility: dosejongApi, uisApi, and sjlmsApi.
Credentials are passed at runtime through CLI arguments, an interactive prompt, or Java method calls. Never hardcode real credentials, commit .env files, or use the project against accounts or services you are not authorized to test.
This project is provided strictly for educational, research, and authorized testing purposes only.
It must not be used for illegal activities, unauthorized access, privacy violations, abuse, harassment, disruption of services, or any activity that violates applicable laws, platform rules, or third-party rights.
The developer does not encourage, support, or take responsibility for any misuse of this project. Users are solely responsible for how they use, modify, or distribute this code. By using this project, you agree that you are responsible for ensuring your actions are legal, ethical, and authorized.
If you are unsure whether your use is allowed, do not use this project.
Contributions are welcome when they improve reliability, safety, documentation, or maintainability. Read CONTRIBUTING.md before opening a pull request and follow the Code of Conduct.
Distributed under the MIT License. See LICENSE for details.
Mahmudkhan Usmanov
- GitHub: @UsmanovMahmudkhan
- LinkedIn: Mahmudkhan Usmanov