DuliDuli Open Platform
EN
简体中文
繁體中文
English
Quick Start APIs DuliDuli Official Website
模板

[SSO]


When third-party applications integrate with the DuliDuli platform, they often need to incorporate DuliDuli's user system, application notifications, and other capabilities. Before utilizing these capabilities, it is typical to verify the legitimacy of the user, which requires "Single Sign-On" authentication.

Currently, DuliDuli implements the Single Sign-On mechanism as follows:

  1. When the Duli client opens a third-party application, the third-party application can obtain an identify_token
  2. through the URL.
  3. The backend service of the third-party application requests Duli's interface to verify the legitimacy based on the identify_token
  4. parameter submitted by the client.

Interface Description

• This interface is independent of other SDK interfaces of DuliDuli services and does not need to adhere to the globally agreed encryption/decryption methods and data formats.

• The DuliDuli client carries the identify_token to the target service, and the target service uses the token as the submission content to call DuliDuli's Single Sign-On interface to confirm the user's identity.

Authentication

Method

GET URL:http://[SERVER:9022]/v1/identify?token=$identify_token

[SERVER:9022]Serveraddress,Such as:http://duliduli.com:8090/v1/identify

Request

Parameters

Type

Required

Description

token

string

Y

Authentication token

In the DuliDuli management backend -> Enterprise Applications -> Application Management -> Homepage Application Configuration URL, use the template parameter [TOKEN]. The DuliDuli client will automatically replace this template parameter with the token when making the request.

Return

{
"code": 0,
"msg": "ok",
"create_time":"2022-08-13 19:55:55",
"data": {
"account": "$account",
"nickName":"$nickName",
"phone":"$phone",
"email":"$email"
}
}

The response data of this interface is not encrypted

Result Fields

Field

Type

Desc

code

int

Description of the interface call status

msg

string

Information description related to the status code

create_time

date

Result return time, format::2022-08-13 19:55:55

data

Account-related information returned after successful authentication

account

string

Account

nick_name

string

Nickname

phone

string

Phone Number

email

string

Email

Error Code

Status(code)

Desc

100010

token has expired