Java and Discuz forum for single Sign-on, via Ucenter (user Admin Center)

Source: Internet
Author: User

Fruit Network-focus on it online
1, follow the following major links to the tutorial, the Base64,client,phpfunctions,uc,xmlhelper to join the Web program.
2, modify Web. XML, join
<display-name> Synchronize the operations instructions issued by UC server </display-name>
3, add new applications in Uccenter, application management
Add apps in Background uccenter, set up sync
Main URL of the app: (Your Java Web program's home directory, such as Http://localhost:8080/demo)
Application interface file name default this uc.php, do not precede the API. It will automatically add
Other options are, other default
Set up automatic activation (required) in the UC settings, site
Ucenter Access address in site-&GT;UC settings: (the address of your PHP uccenter forum)
Src/main/resources/ as follows
UC_API = URL address of php discuzz forum Uccenter Http://
UC_IP = IP Address of PHP discuzz forum Uccenter
Uc_key = 123456abc
Uc_appid = 2
Uc_connect =
Value-focused articles (website and discuz synchronization)

1,java and Discuz forum for single Sign-on, via Ucenter (User Management Center)
2, Website Integration discuz! NT Forum, website users and forum users unified and synchronized, detailed
3,discuz x2.5 Forum and other systems integrate reverse data synchronization issues
4,ucenter finishing Tipask question answering system and discuz single synchronization Problem Solving method
Http://, about website user access, single sign-on, Discuz,ucenter
6, perfect integration of Phpcms V9 and Discuz X3.1 to achieve the simultaneous landing exit forum free activation
7,ecshop Integrated Discuz6.1 How can I not activate directly to let users log in?
8,ucenter Single Sign-on problem in Java
9,java project implementation with Discuz and Ucenter synchronous login
10,36 using Ucenter to realize Discuz and Javaweb single point application
11,java Integration Discuz Summary (Implementation and forum synchronization login, etc.)
12,ucenter experience in integration with Java language
Implementation of single sign-on between 13,discuz Ucenter and Java projects 9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95.html

The following is an opinion reference:

1, let all users using Discuz re-register

2, study the table structure of Discuz, import the user information that your website has registered (that is, the user table content of your website into discuz user table);
In addition, the process is best done by the program, so that in the future you can do a trigger or scheduled tasks to automatically complete. Real-time update of DISCUZ user table data
Timed synchronization. Can be placed at midnight every day. Timeliness almost, but the most worry.
Trigger. Absolute real-time.

3, if it is more than MYSQL5, you can use the view. Let Discuz access your site's existing user tables through view
It's good, but they're in a different database, wouldn't it be a hassle

4, re-develop a management user's Web services, so that discuz users of authentication and other processing through the API. DISCUZ table structure documents can be downloaded from the official website.
It's all going to change the discuz source, okay?

5, on the basis of your existing website user management data, do a user authentication, login and update the user Information API (Web services),
Discuz related to user authentication, login and user Information update processing, all the data operations to rewrite,
Make it a DAO that accesses your API.
However, this is only one of my ideas, the specific can be changed, need to examine the Discuz data layer and the logic processing layer separation status (discuz design is difficult to say)

6,discuz has a pass system, refer to the online Discuz Pass sample, the original JSP login registration part in accordance with the pass standard re-modify, and then set the pass in the discuz background


7, I called the interface API of Ucenter and found that only the user under Ucenter could be created, not for discuz.
Login to DZ and set the activation free
User, backstage, webmaster, UC Settings

8,discuz!x2.5 User Center Ucenter Add user and forum user Sync activation setting method

9,java and Discuz forum for single Sign-on, via Ucenter (User Management Center)

10, according to these cookies can be implemented in the site page after the forum login synchronization to the site

11, register
Registration of the Java Web site
Boolean falg = Tempuserservice.insert (Tempuservo);
Register for the Sync Forum
String $returns = Uc.uc_user_register (Tempuservo.getusername (), Tempuservo.getpass (), Tempuservo.geteamil ());
Java website Web site login, Sync discuz Forum Login
Log in to Mason Web site > Call client's UC login interface to get user information > Accept returned user XML information and resolve > Call Client login discuz Forum Login interface
> Accept the returned JS code > output to the Java Web site > jump to the Forum address (now you will find that the user is already logged in)

Java Web site exit, Forum synchronization exit
Java Web site logout > Call client inside uc_user_synlogout and logout forum user

12, Forum login Sync login java Web site

13, Chinese name cannot be landed, please urlencode.encode (str) to Urlencode.encode (str, "GBK")

Java and Discuz forum for single Sign-on, via Ucenter (user Admin Center)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.