Skip to content

Raw response and extra options

A default result has named fields only. Turn the two options on only when you need more; turning them on changes no other field.

Names follow Python; Java and Node.js use camelCase. Node.js takes them as an object in the last argument ({ includeRaw: true }).

Parameter Type Required Default Meaning
include_raw boolean no false Keeps the school’s raw response in the result (raw_html, raw_json). In Java: authenticateWithRaw, authenticateWithDHCRaw, authenticateWithSISRaw
include_extra boolean no false Puts the remaining unnamed SIS fields in the extra map. Integrated and SIS authentication only. In Java: the last argument of authenticate(id, pw, false, true)

With an option on, the fields below are filled. The example uses Python snake_case names; Java and Node.js use camelCase (rawHtml, rawJson).

{
"student_id": "20000000",
"name": "홍길동",
"extra": { "dm_UserInfoSch.FIELD_NAME": "value" },
"raw_html": "<html>...</html>",
"raw_json": "{...}"
}
Field Type Filled when
raw_html string or null The DHC page, with the raw option. DHC and integrated results
raw_json string or null The SIS initUserInfo response, with the raw option. SIS and integrated results. null if SIS failed
extra map or null With the extra option, otherwise null. Not in a DHC result

Keeps the response the school sent, as is, in the result. For debugging and parser checks.

  • An integrated result fills both raw_html and raw_json, a DHC result raw_html only, a SIS result raw_json only.
  • No extra request is made. It only keeps responses already received.

Returns the remaining SIS fields the school provides, other than the named ones, as a {"dataset.FIELD": "value"} map. It is a way to reach a field the school adds without waiting for a release.

  • The source is the scalar fields of the datasets dm_UserInfoSch, dm_UserInfoGam and dm_UserInfo.

Keys matching extraExcludedKeyPattern in spec/contract.json (case-insensitive) never enter extra.

(PWD|PASS|JUMIN|RRN|RESI|SSN|BANK|ACNT|ACCT|ACCOUNT|ADDR|ZIP|POST|ALIAS|SESS|TOKEN|SECRET|BIRTH|BRTH|VALID|PHONE|TEL|MOBILE|MAIL|LOGIN|RUNNING|(^|_)IP($|_)|_YN$)

That covers session values, client IP, password and account state flags, resident number, bank account, address, staff-name fields (ALIAS), phone, mail and birth date. It is still a best-effort name pattern filter. Do not forward extra to an external client as is; pick the keys you need.

The keys and structure of the raw responses and the keys and values of extra change whenever the school changes them. Do not hang core app logic on them. For stable access use the named fields in Result fields. The policy is in API stability.

SejongAuthResult result = sejongAuthEngine.authenticateWithRaw(studentId, password);
String html = result.getRawHtml(); // DHC raw
String json = result.getRawJson(); // SIS raw (null if SIS failed)
sejongAuthEngine.authenticateWithDHCRaw(studentId, password); // DHC result + rawHtml
sejongAuthEngine.authenticateWithSISRaw(studentId, password); // SIS result + rawJson
// arguments: student ID, password, include raw, include extra
SejongAuthResult result = sejongAuthEngine.authenticate(studentId, password, false, true);
Map<String, String> extra = result.getExtra();