[ADMIN] คู่มือการเชื่อมต่อระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์ KKUID HUB

[ADMIN] คู่มือการเชื่อมต่อระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์ KKUID HUB

1.             ระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์ (KKUID HUB) และระบบบริหารจัดการทรัพยากรบุคคล (Human Capital Management: HCM)

1.1.              ระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์ (KKUID HUB) และระบบบริหารจัดการทรัพยากรบุคคล (Human Capital Management: HCM) การออกแบบโครงสร้างการเชื่อมต่อข้อมูลกับระบบ (Architecture Diagram)

A screenshot of a computer

AI-generated content may be incorrect.

รูปที่ 1 การออกแบบโครงสร้างการเชื่อมต่อข้อมูลกับระบบ (Architecture Diagram)

A diagram of a computer

AI-generated content may be incorrect.


 

ตาราง 1 ตารางอธิบายการทำงานระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์

ลำดับ

คำอธิบาย

1

เข้าสู่ระบบ HCM คลิกปุ่ม “ThaiD Update” ระบบจะ Re-direct ไปที่ KKU ID HUB

2

ระบบ ThaiD ทำการ Generate QR Code

3

ยืนยันตัวตนผ่าน ThaiD ผ่านจะส่งข้อมูลบุคคลจากกรมการปกครองผ่าน Callback URL

4

ตรวจสอบสถานะ(State) และรหัสบัตรประชาชน(National ID) เพื่อป้องการการสแกน QR Code ที่ไม่ใช้เจ้าของบัญชี

5

ปรับปรุงข้อมูลจากกรมบัญชีกลางเข้าสู้ระบบ HCM Core HR(ระบบโครงสร้างองค์กรและฐานข้อมูลบุคคล)

1.1.1.                       ระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์ (KKUID HUB) - API

HTTP Method

POST

Endpoint

/hcmRestApi/resources/11.13.18.05/userAccounts

/resources/11.13.18.05/userAccounts?q=Username=<username>

Method

GET

Request Body

Response

{

    "items": [

        {

            "UserId": 300000011360542,

            "Username": "hathaikan@kku.ac.th",

            "SuspendedFlag": false,

            "PersonId": 100000006476735,

            "PersonNumber": "117495",

            "CredentialsEmailSentFlag": false,

            "GUID": "1D9B8FF672815A0CE0630A0312ACD9F5",

            "CreatedBy": "FUSION_APPS_HCM_ESS_APPID",

            "CreationDate": "2024-09-27T06:16:56+00:00",

            "LastUpdatedBy": "FUSION_APPS_HCM_ESS_APPID",

            "LastUpdateDate": "2024-12-01T16:19:12.520+00:00",

            "links": [

                {

                    "rel": "self",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/userAccounts/1D9B8FF672815A0CE0630A0312ACD9F5",

                    "name": "userAccounts",

                    "kind": "item",

                    "properties": {

                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000017704000000017372001B6F7261636C652E6A626F2E646F6D61696E2E4E756C6C56616C75655899C1C58DAABEEB02000149000A6D53514C54797065496478700000000C78"

                    }

                },

                {

                    "rel": "canonical",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/userAccounts/1D9B8FF672815A0CE0630A0312ACD9F5",

                    "name": "userAccounts",

                    "kind": "item"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/userAccounts/1D9B8FF672815A0CE0630A0312ACD9F5/child/userAccountRoles",

                    "name": "userAccountRoles",

                    "kind": "collection"

                },

                {

                    "rel": "action",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/userAccounts/1D9B8FF672815A0CE0630A0312ACD9F5/action/resetPassword",

                    "name": "resetPassword",

                    "kind": "other"

                },

                {

                    "rel": "action",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/userAccounts/1D9B8FF672815A0CE0630A0312ACD9F5/action/updatePassword",

                    "name": "updatePassword",

                    "kind": "other"

                },

                {

                    "rel": "action",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/userAccounts/1D9B8FF672815A0CE0630A0312ACD9F5/action/autoprovisionRoles",

                    "name": "autoprovisionRoles",

                    "kind": "other"

                }

            ]

        }

    ],

    "count": 1,

    "hasMore": false,

    "limit": 25,

    "offset": 0,

    "links": [

        {

            "rel": "self",

            "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/userAccounts",

            "name": "userAccounts",

            "kind": "collection"

        }

    ]

}

 

Response

User Data Response From ThaiD

{

at_hash: 'iXKHB6rXgR71IUc84h-dMQ',

aud: 'U3haSW5oVzZ5aDVCeEZHR2JSTEFZMDRrVTNOM1dpbnQ',

exp: 1729498916,

iat: 1729498016,

iss: 'https://imauth.bora.dopa.go.th',

sub: '1100400416571',

pid: '1100400416571',

name: 'นาย ธนภูมิ ชัยณรงค์โสภณ',

name_en: 'Mr. Thanapoom Chainarongsophon',

birthdate: '1989-10-03',

address: {

formatted: '694/31 ซ.พญานาค แขวงถนนเพชรบุรี เขตราชเทวี กรุงเทพมหานคร',

},

house_address: {

id: '10140355561',

formatted:

'694/31 ซอยพญานาค แขวงถนนเพชรบุรี เขตราชเทวี กรุงเทพมหานคร',

raw: '694/31###พญานาค##ถนนเพชรบุรี#เขตราชเทวี#กรุงเทพมหานคร',

},

given_name: 'ธนภูมิ',

given_name_en: 'Thanapoom',

family_name: 'ชัยณรงค์โสภณ',

family_name_en: 'Chainarongsophon',

middle_name: '',

middle_name_en: '',

gender: 'male',

titleTh: 'นาย',

titleEn: 'Mr.',

cardCreated: '2022-01-10',

cardExpired: '2030-10-02',

smartCardCode: '1037-03-01100956',

ial: '2.3',

version: 2,

auth_time: 1729498016,

};

 

HTTP Method

POST

Endpoint

Endpoint: /hcmRestApi/resources/11.13.18.05/workers

Method

GET

Request Body

Response

{

    "items": [

        {

            "PersonId": 100000006467339,

            "PersonNumber": "105212",

            "CorrespondenceLanguage": null,

            "BloodType": "NS",

            "DateOfBirth": "1945-11-23",

            "DateOfDeath": null,

            "CountryOfBirth": null,

            "RegionOfBirth": null,

            "TownOfBirth": null,

            "ApplicantNumber": null,

            "CreatedBy": "FUSION_APPS_HCM_ESS_LOADER_APPID",

            "CreationDate": "2024-09-23T12:01:52+00:00",

            "LastUpdatedBy": "FUSION_APPS_HCM_ESS_APPID",

            "LastUpdateDate": "2024-09-27T06:30:46.717+00:00",

            "links": [

                {

                    "rel": "self",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078",

                    "name": "workers",

                    "kind": "item",

                    "properties": {

                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000002770400000002737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000027371007E00020000000378"

                    }

                },

                {

                    "rel": "canonical",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078",

                    "name": "workers",

                    "kind": "item"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/addresses",

                    "name": "addresses",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/citizenships",

                    "name": "citizenships",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/disabilities",

                    "name": "disabilities",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/driverLicenses",

                    "name": "driverLicenses",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/emails",

                    "name": "emails",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/ethnicities",

                    "name": "ethnicities",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/externalIdentifiers",

                    "name": "externalIdentifiers",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/legislativeInfo",

                    "name": "legislativeInfo",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/messages",

                    "name": "messages",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/names",

                    "name": "names",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/nationalIdentifiers",

                    "name": "nationalIdentifiers",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/otherCommunicationAccounts",

                    "name": "otherCommunicationAccounts",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/passports",

                    "name": "passports",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/phones",

                    "name": "phones",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/photos",

                    "name": "photos",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/religions",

                    "name": "religions",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/visasPermits",

                    "name": "visasPermits",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/workRelationships",

                    "name": "workRelationships",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/workersDFF",

                    "name": "workersDFF",

                    "kind": "collection"

                },

                {

                    "rel": "child",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF310DCEF0B0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001945CF5CC0078/child/workersEFF",

                    "name": "workersEFF",

                    "kind": "collection"

                }

            ]

        }

    ]

}

 

HTTP Method

POST

Endpoint

/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/names

Method

PATCH

Response

API: Update Worker Name Information

Request Body:

{

  "Title": "MR.",

  "FullName": "NAME",

  "FirstName": "GivenName",

  "MiddleNames": "MiddleName",

  "LastName": "FamilyName",

  "LocalFullName": "NAMEEN",

  "LocalFirstName": "GivenNameEN",

  "LocalMiddleNames": "MiddleNameEN",

  "LocalLastName": "FamilyNameEN"

}

 


 

HTTP Method

POST

Endpoint

/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/legislativeInfo

Method

PATCH

Response

API: Update Worker Gender

Request Body:

{

  "Gender": "M",

  "LegislationCode": "TH"

}

 

HTTP Method

POST

Endpoint

/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}

Method

PATH

Request Body

Response

Attributes to be Updated:

         Date of Birth

         Addresses

         FullName, FirstName, MiddleNames, LastName

         LocalFullName, LocalFirstName, LocalMiddleNames, LocalLastName

         Title

         Gender

API Calls for Updating Worker Data

API: Update Worker Date of Birth

Request Body:

{

  "DateOfBirth": "2000-10-10"

}

 


 

HTTP Method

POST

Endpoint

/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/addresses/

Method

PATCH

Request Body

Response

API: Update Worker Address Information

Request Body:

{

  "AddressLine1": "Address1",

  "AddressLine2": "Line2",

  "TownOrCity": "Test Town",

  "Region1": "สาวะถี",

  "Region2": "Northeastern 2",

  "Region3": "ขอนแก่น",

  "Country": "TH",

  "PostalCode": "40000",

  "AddressType": "MAIL"

}

 


 

1.1.1.1.                   ระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์

ลำดับ

ชื่อรายการภาษาอังกฤษ

ชื่อรายการภาษาไทย

Value

1

PID

รหัสบัตรประชาชน

1100400416571

2

TITLE

คำนำหน้า

นาย

3

TITLEEN

คำนำหน้าภาษาอังกฤษ

Mr.

4

NAME

ชื่อ

นาย ธนภูมิ ชัยณรงค์โสภณ

5

NAMEEN

ชื่อภาษาอังกฤษ

Mr. Thanapoom Chainarongsophon

6

GIVENNAME

ชื่อจริง

ธนภูมิ

7

GIVENNAMEEN

ชื่อจริงภาษาอักฤษ

Thanapoom

8

MIDDLENAME

ชื่อกลาง

-

9

MIDDLENAMEEN

ชื่อกลางภาษาอังกฤษ

-

10

FAMILYNAME

นามสกุล

ชัยณรงค์โสภณ

11

FAMILYNAMEEN

นามสกุลภาษาอังกฤษ

Chainarongsophon

12

GENDER

เพศ

male

13

BIRTHDATE

วันเดือนปีเกิด

2000-10-10

14

ADDRESS

ที่อยู่

Address1

15

Region1

ตำบล

สาวะถี

16

Region2

อำเภอ

Northeastern 2

17

Region3

จังหวัด

ขอนแก่น

18

Country

ประเทศ

TH

19

PostalCode

รหัสไปรษณีย์

40000

20

SMARTCARDCODE

รหัสบัตรสมาร์ตการ์ด

1037-03-01100956

1.1.2.                       เอกสารแนบเพิ่มเติมจากมหาวิทยาลัย: คู่มือการเชื่อมต่อ ThaiD ด้วย KKU ID HUB รูปแบบ CURL

A screenshot of a computer

AI-generated content may be incorrect.