- We can not integrate hypersign sdk in wp-backend because we can not write whole sdk in php - WP supports PHP.
- When a user opens the login page, the
wb-frontendrequest a new challenge fromwp-backend. Thewp-backendrequests that fromHS-WP-Serverby sendingAppIDandAppSecret. - The
HS-WP-Serverconnects withHS-Subscription serverto verify theAppIDandAppSecret. - The
HS-WP-Serverthen sends a new challenge along with other metadata like did, schema etc to theWP-backendor to the Hypersign plugin. - The
Hypersign-pluginatWP-frontenddisplays the QR code. - The user scans the QR code and generates verifiable presentation
- Meanwhile
Hypersign-pluginatWP-frontendkeep polling theWP-backendabout this challenge.
- Meanwhile
- The user sends the VP to the
WP-backend, theWP-backendthen again interacts withHS-WP-Serverto verify the VP. - The
HS-WP-Serververifies the VP and sends the userdata back toWP-backend. - The
WP-backendresponds to the polling request from frontend. - The
WP-backendchecks if this user is already present in the db, if not it creates a new user in the db.
Note:
- The admin of the app has to comes to developer portal and get
AppIDandAppSecret. - The admin then installs the
Hypersign WordPress Pluginin the app.
cd /var/www/html/wp-content/plugins/
git clone https://github.com/hypersign-protocol/hs-wordpress-plugin hypersign-auth
POST 192.168.43.43/index.php/wp-json/hs/api/v2/challenge
Body: {
"user": 123,
"name": "Vishwas anand",
"email": "vishu1@gmail.com"
}[
{
"user": 123,
"name": "Vishwas anand",
"email": "vishu1@gmail.com"
},
{
"challenge": "7d5a355f-40da-4635-91ad-ec4c15ebed00"
}
]GET 192.168.43.43/index.php/wp-json/hs/api/v2/challenge{
"status": 200,
"message": "success",
"error" : null
}