Previous articles have introduced the spring Cloud SSO integration scheme, and also made the Spring + JWT + Redis solution. Seamless integration of different systems, unified SSO single sign-on interface management, permission authentication for each application integration, whitelist and so on are all things we need to consider. Now in view of the above problems we have done sso single sign-on application authentication platform, the design is as follows: willing to understand the source of the friend directly beg exchange sharing technology 2147 777 563

  1. Database design:
DROP TABLE IF EXISTS `sso_app_apply`;
CREATE TABLE `sso_app_apply` (
  `id` varchar(200) NOT NULL COMMENT 'number',
  `type` varchar(200) NOT NULL COMMENT 'Category of ownership',
  `applicant` varchar(200) NOT NULL COMMENT 'Applicant',
  `approver` varchar(200) NOT NULL COMMENT 'Approver',
  `appname` varchar(200) NOT NULL COMMENT 'Application Name',
  `range` varchar(200) NOT NULL COMMENT 'Scope of use',
  `token` varchar(200) NOT NULL COMMENT 'Token Authentication Code',
  `approval_time` datetime NOT NULL COMMENT 'Approval Time',
  `create_date` datetime NOT NULL COMMENT 'Creation time',
  `update_by` varchar(64) NOT NULL COMMENT 'Updater',
  `update_date` datetime NOT NULL COMMENT 'Update Time',
  `del_flag` char(1) NOT NULL DEFAULT '0' COMMENT 'Delete tag',
  `status` char(1) DEFAULT '0' COMMENT 'Review Status: 0(pending review) 1(Approved review) 2(rejected) 3(Blacklist)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='SSO Application Form';
 
DROP TABLE IF EXISTS `sso_app_template`;
CREATE TABLE `sso_app_template` (
  `id` varchar(200) NOT NULL COMMENT 'number',
  `a_id` varchar(200) NOT NULL COMMENT 'application id',
  `t_id` varchar(200) NOT NULL COMMENT 'template id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='SSO Application Template Intermediate Table';
 
DROP TABLE IF EXISTS `sso_template`;
CREATE TABLE `sso_template` (
  `id` varchar(200) NOT NULL COMMENT 'number',
  `name` varchar(200) NOT NULL COMMENT 'Template name',
  `type` varchar(200) NOT NULL COMMENT 'Template classification',
  `img` varchar(200) NOT NULL COMMENT 'Template image',
  `create_by` varchar(64) NOT NULL COMMENT 'Creator',
  `create_date` datetime NOT NULL COMMENT 'Creation time',
  `update_by` varchar(64) NOT NULL COMMENT 'Updater',
  `update_date` datetime NOT NULL COMMENT 'Update Time',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='SSO Template table';
Copy the code
  1. Execute the process

A. Adult user registration (individual account or enterprise account can be registered)

B. Apply for applications (multiple applications may be required) and select different templates (different templates correspond to SSO systems in different industries).

C. Management personnel conduct application review (review of information submitted by the applicant). After the review is passed, the token information corresponding to the application is generated through encryption

D. Background management (application list, application review, template management, etc.)

E. Transfer token information and application information for SSO unified interceptor authentication (verification whitelist)

F. Successful or failed (The SSO login page of the specified template is displayed)

  1. Effect interface:

Data and source code