Authenticate by Passing Parameters

Do NOT expose clear text password in the URL or DOM.

รับรองความถูกต้องโดยผ่านพารามิเตอร์

For JSON API authentication purposes, the following parameters can be posted to each of the JSON API URLs:

สำหรับวัตถุประสงค์ในการรับรองความถูกต้องของ JSON API พารามิเตอร์ต่อไปนี้สามารถโพสต์ / ผนวกเข้ากับแต่ละ URL ของ JSON API:

Example:

ตัวอย่าง:


Assuming the username and password required is "user1" and "password1" respectively, we can post the username and password to the JSON API using following script.

สมมติว่าชื่อผู้ใช้และรหัสผ่านที่ต้องการคือ "user1" และ "password1" ตามลำดับเราสามารถโพสต์ชื่อผู้ใช้และรหัสผ่านไปยัง JSON API โดยใช้สคริปต์ ต่อไปนี้

curl --location --request POST --data 'j_username=user1&j_password=password1' 'http://localhost:8080/jw/web/json/workflow/assignment/list'
{"total" : 12 }



If you prefer to use hashed password, you can use the following script.

หากคุณต้องการใช้ hashed password คุณสามารถใช้สคริปต์ต่อไปนี้

Please note that the support on Hashed Password is based on the Directory Manager you are using. Some Directory Manager Plugin may not supporting this type of authentication method.

The format and hashing method may vary for each Directory Manager as well.

โปรดทราบว่าการสนับสนุนรหัสผ่านที่แฮชจะขึ้นอยู่กับตัวจัดการไดเรกทอรีที่คุณใช้งานอยู่ ปลั๊กอินตัวจัดการไดเรกทอรีบางตัวอาจไม่สนับสนุนวิธีการรับรองความถูกต้องประเภทนี้

รูปแบบและวิธีการแฮชอาจแตกต่างกันสำหรับแต่ละตัวจัดการไดเรกทอรีเช่นกัน

curl --location --request POST --data 'j_username=user1&hash=D012B772672A55A0B561EAA53CA7734E' 'http://localhost:8080/jw/web/json/workflow/assignment/list/pending'
{"total" : 12 }


Master Login Username and Password

Do NOT expose clear text password in the URL or DOM.

Master ชื่อผู้ใช้และรหัสผ่าน

When authentication using parameters, you are allowed to using a Master Credential to login as other user to performance workflow activities. 

To use it, set a Master Login Username and Master Login Password under System Settings > General Setting. By setting these values, a different user can be specified by passing in the "loginAs" parameter.

เมื่อการรับรองความถูกต้องโดยใช้พารามิเตอร์คุณจะได้รับอนุญาตให้ใช้ข้อมูลรับรองหลักเพื่อเข้าสู่ระบบในฐานะผู้ใช้รายอื่นกับกิจกรรมเวิร์กโฟลว์ประสิทธิภาพ

หากต้องการใช้งานให้ตั้งค่าชื่อผู้ใช้เข้าสู่ระบบหลักและรหัสผ่านเข้าสู่ระบบหลักภายใต้ System Settings > General Setting โดยการตั้งค่าเหล่านี้ผู้ใช้ที่แตกต่างกันสามารถระบุได้โดยผ่านในพารามิเตอร์ "loginAs"

Please note that only enable this when it is necessary. Leaking of your Master Credential will allows others to performs all the unwanted JSON API calls.

โปรดทราบว่าเปิดใช้งานสิ่งนี้เฉพาะเมื่อจำเป็นเท่านั้น การรั่วไหลของข้อมูลรับรองหลักของคุณจะช่วยให้ผู้อื่นทำการเรียก JSON API ที่ไม่ต้องการทั้งหมด

Assuming the master login username and master login password is "master" and "master" respectively, the master login hash will be "E505CF727D214A68CB03DA25DA978500".

The following example showcases how to use a Master Credential to login as "user1".

สมมติว่าชื่อผู้ใช้ล็อกอินหลักและรหัสผ่านล็อกอินหลักคือ "master" และ "master" ตามลำดับแฮชการล็อกอินหลักจะเป็น "E505CF727D214A68CB03DA25DA978500"

ตัวอย่างต่อไปนี้แสดงให้เห็นถึงวิธีการใช้ข้อมูลรับรองหลักเพื่อเข้าสู่ระบบในฐานะ "user1"

curl --location --request POST --data 'j_username=master&j_password=master&loginAs=user1' 'http://localhost:8080/jw/web/json/workflow/assignment/list'
{"total" : 12 }



Using master login hash:

การใช้แฮชล็อกอินหลัก:



curl --location --request POST --data 'j_username=master&j_password=master&loginAs=user1' 'http://localhost:8080/jw/web/json/workflow/assignment/list'
{"total" : 12 }


Basic Http Authentication

การรับรองความถูกต้อง HTTP พื้นฐาน

Since V4, Joget supports Basic HTTP Authentication in JSON API authentication so you can pass the credentials in the header.

ตั้งแต่ V4 Joget Workflow ได้รับการสนับสนุน Basic HTTP Authentication ในการรับรองความถูกต้องของ JSON API คุณสามารถส่งหนังสือรับรองในส่วนหัวได้


Example:

ตัวอย่าง:


Assuming the username and password required is "user1" and "password1" respectively, we can set the Basic Auth header to the JSON API using following script.

สมมติว่าชื่อผู้ใช้และรหัสผ่านที่ต้องการคือ "user1" และ "password1" ตามลำดับเราสามารถตั้งค่าหัวข้อ Auth พื้นฐานเป็น JSON API โดยใช้สคริปต์ ต่อไปนี้

 

curl --location --request POST 'http://localhost:8080/jw/web/json/workflow/assignment/list/pending' --header 'Authorization: Basic dXNlcjE6cGFzc3dvcmQx'
{"total" : 12 }