-
Notifications
You must be signed in to change notification settings - Fork 2
JI Account Authorization
http://www.umji.sjtu.edu.cn/student/user/jiaccount
We use HTTP GET method to receive the callback url.
http://www.umji.sjtu.edu.cn/student/user/jiaccount?url=https%3A%2F%2Fwww.github.com%2F
(The query in the url above is parsed by PHP function urlencode
)
You can add your custom http query, for example:
http://www.umji.sjtu.edu.cn/student/user/jiaccount?url=https%3A%2F%2Fwww.github.com%2F?xx=yy
The url will be checked by PHP function filter_var($url, FILTER_VALIDATE_URL)
If you pass an illegal url, we will return the message:
url validation failed!
If the user login through JAccount successfully, we will return the data through HTTP GET method to the url you provided.
The data format is shown below:
Key | Value |
---|---|
result | "success" |
jaccount | JAccount username |
user_id | SJTU ID |
user_name | Chinese name |
user_type | "student"/"faculty"/etc |
For example:
https://github.com/?result=success&jaccount=github&user_id=100000000000&name=XXX
If the authorization is failed, you will only receive the following data:
Key | Value |
---|---|
result | "fail" |
For example:
https://github.com/?result=fail