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.
Request parameters
Section titled “Request parameters”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) |
Response data structure
Section titled “Response data structure”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 |
Raw option
Section titled “Raw option”Keeps the response the school sent, as is, in the result. For debugging and parser checks.
- An integrated result fills both
raw_htmlandraw_json, a DHC resultraw_htmlonly, a SIS resultraw_jsononly. - No extra request is made. It only keeps responses already received.
Extra option
Section titled “Extra option”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_UserInfoGamanddm_UserInfo.
Always-excluded keys
Section titled “Always-excluded keys”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.
Outside the compatibility guarantee
Section titled “Outside the compatibility guarantee”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.
Example code
Section titled “Example code”Raw option
Section titled “Raw option”SejongAuthResult result = sejongAuthEngine.authenticateWithRaw(studentId, password);String html = result.getRawHtml(); // DHC rawString json = result.getRawJson(); // SIS raw (null if SIS failed)
sejongAuthEngine.authenticateWithDHCRaw(studentId, password); // DHC result + rawHtmlsejongAuthEngine.authenticateWithSISRaw(studentId, password); // SIS result + rawJsonresult = authenticate(student_id, password, include_raw=True)html, json_text = result.raw_html, result.raw_json
authenticate_dhc(student_id, password, include_raw=True) # DHC result + raw_htmlauthenticate_sis(student_id, password, include_raw=True) # SIS result + raw_jsonconst result = await authenticate(studentId, password, { includeRaw: true });const { rawHtml, rawJson } = result;
await authenticateDhc(studentId, password, { includeRaw: true }); // DHC result + rawHtmlawait authenticateSis(studentId, password, { includeRaw: true }); // SIS result + rawJsonExtra option
Section titled “Extra option”// arguments: student ID, password, include raw, include extraSejongAuthResult result = sejongAuthEngine.authenticate(studentId, password, false, true);Map<String, String> extra = result.getExtra();result = authenticate(student_id, password, include_extra=True)extra = result.extra # {"dataset.FIELD": "value"}const result = await authenticate(studentId, password, { includeExtra: true });const { extra } = result; // { 'dataset.FIELD': 'value' }