Skip to content

Quick start

  1. Install it. Pin the exact version. All versions are on GitHub Releases (API stability).

    Maven Central

    Published to Maven Central, so no extra repository is needed. Java 17+, Spring Boot 3.x.

    dependencies {
    implementation "kr.suhsaechan:sejongpeia:<version>"
    }
    <dependency>
    <groupId>kr.suhsaechan</groupId>
    <artifactId>sejongpeia</artifactId>
    <version><!-- the version you pin --></version>
    </dependency>

    Put the latest version in <version>. Check it on the Maven Central artifact page; all versions are listed in the repository index.

  2. Call student verification. One integrated call with a student ID and password.

    Spring Boot auto-configuration registers a SuhSejongAuthEngine bean.

    @RestController
    @RequiredArgsConstructor
    public class AuthController {
    private final SuhSejongAuthEngine sejongAuthEngine;
    @PostMapping("/auth/sejong")
    public SejongAuthResult authenticate(@RequestParam String studentId,
    @RequestParam String password) {
    return sejongAuthEngine.authenticate(studentId, password);
    }
    }

    Branch on the error code, never on the message. The code list is in Error codes.

  3. Call school data that needs no login. Get the department list, then the course listings of the first department (undergraduate). "20" (undergraduate) and the semester value are the school’s own values.

    SejongPublicData publicData = new SejongPublicData(); // inject it as a bean in Spring
    List<Department> departments = publicData.departments("20", "2026", "20");
    List<Lecture> lectures = publicData.lectures("20", "2026", "20", departments.get(0).getCode(), "", "");

    Create one SejongPublicData per process. The in-memory cache (24 hours by default) and request coalescing live inside the instance.

Spring Boot is an optional dependency, so a plain Java project does not pull it in. The JVM blocks the old TLS cipher the portal accepts, so call SejongTlsSupport.ensureLegacyCipherEnabled() first in main(), before any other HTTPS call.

import kr.suhsaechan.sejongpeia.auth.client.SejongPortalClient;
import kr.suhsaechan.sejongpeia.auth.client.SejongSisClient;
import kr.suhsaechan.sejongpeia.auth.model.SejongAuthResult;
import kr.suhsaechan.sejongpeia.auth.parser.SejongClassicReadingParser;
import kr.suhsaechan.sejongpeia.auth.parser.SejongSisParser;
import kr.suhsaechan.sejongpeia.auth.parser.SejongStudentInfoParser;
import kr.suhsaechan.sejongpeia.auth.service.SuhSejongAuthEngine;
import kr.suhsaechan.sejongpeia.common.config.SejongAuthProperties;
import kr.suhsaechan.sejongpeia.common.util.SejongTlsSupport;
SejongTlsSupport.ensureLegacyCipherEnabled(); // first in main(), before any other HTTPS call
SejongAuthProperties properties = new SejongAuthProperties();
SuhSejongAuthEngine engine = new SuhSejongAuthEngine(new SejongPortalClient(properties), new SejongStudentInfoParser(),
new SejongClassicReadingParser(), new SejongSisClient(properties), new SejongSisParser());
SejongAuthResult result = engine.authenticate(studentId, password);

Called too late, authentication fails with CONNECTION_FAILED and a message that names the cause. The setting applies to the whole JVM. See Legacy TLS for why. Spring Boot handles it at startup, and Python and Node change only the TLS settings of their own connections.