Closed xueruini closed 8 years ago
I might need to move this brithon.com
.
Should we use a set of self-made API in sso
module as follows?
1.brithoncrm_login
admin-ajax.php?action=brithoncrm_login
A product send request containing this action name as well as username
, password
and remember
to the CRM site for login. If success it returns the user info, after which the product site will register a user on its own site according the info on condition that it doesn't exist, and login.
2.brithoncrm_register
An API to register a user on the CRM site
3.brithoncrm_get_user_info
To get a user's subscriptions information
As for using a third-party plugin like WP OAuth Server, we need to create a APPKey for each product manually and then hard code them in the products, which I don't think is a good idea. Besides, it seems that they all require purchasing for mass users support.
@xueruini @lukehl
Talked a bit with Wei days ago, and I asked him to write here. I have been working very hard on builder during the last two days, and it just works now.
Let me move to sso now. :)
Let define the name of sites first:
There are several types of user in the our system:
For the bi-directional communication between main site and products sites (actually, the product sub site), should leverage the authorization mechanism of wp, otherwise, we would have to pass special identity (like appkey) info in the ajax to verify the request. I agree with you to write own API instead of WP OAuth Server, because it is a general OAuth solution, and does not support close interactions in our scenario.
@xueruini Get.
brithon.com
already.switch user
.@excelle08
Some tech details I figure out:
brithon-crmx
plugin of all product sites to call them to register and log in.@xueruini
Main site admin would CURD product information (mainly name) so that the system knows the site URLs.
We could hardcode this in the initial stage, while it would be better to support configuration online.
Each product site manage user's subscription information independently.
Good question. What if the user wants to list all subscriptions for various products?
What if the user wants to list all subscriptions for various products?
What about calling the sub sites to pass their subscriptions information?
What about calling the sub sites to pass their subscriptions information?
You have to talk to each sub-site to retrieve. I prefer to maintain all subscription info for all products in the main site.
Let's apply secure cookie to keep login state.
wp_signon
does not work in cross-site communication.
secure cookie is a must.
We will reorganize the sites as following: