Spring+ Spring cloud + SSO single sign-on application authentication

In the previous article, I introduced the solution of spring cloud sso integration, and I have also done the solution of spring + jwt + redis, seamless integration of different systems, unified management of sso single sign-on interface, permission authentication for each application integration, We need to consider the white list and so on. Now we have made the sso single sign-on application authentication platform for the above problems. The design is as follows:

1. Database design:

DROP TABLE IF EXISTS `sso_app_apply`;
CREATE TABLE `sso_app_apply` (
  `id` varchar(200) NOT NULL COMMENT '编号',
  `type` varchar(200) NOT NULL COMMENT '所属分类',
  `applicant` varchar(200) NOT NULL COMMENT '申请人',
  `approver` varchar(200) NOT NULL COMMENT '审批人',
  `appname` varchar(200) NOT NULL COMMENT '应用名称',
  `range` varchar(200) NOT NULL COMMENT '使用范围',
  `token` varchar(200) NOT NULL COMMENT 'token认证码',
  `approval_time` datetime NOT NULL COMMENT '审批时间',
  `create_date` datetime NOT NULL COMMENT '创建时间',
  `update_by` varchar(64) NOT NULL COMMENT '更新者',
  `update_date` datetime NOT NULL COMMENT '更新时间',
  `del_flag` char(1) NOT NULL DEFAULT '0' COMMENT '删除标记',
  `status` char(1) DEFAULT '0' COMMENT '审核状态:0(待审核) 1(审核通过) 2(驳回) 3(黑名单)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='sso应用申请表';
DROP TABLE IF EXISTS `sso_app_template`;
CREATE TABLE `sso_app_template` (
  `id` varchar(200) NOT NULL COMMENT '编号',
  `a_id` varchar(200) NOT NULL COMMENT '应用id',
  `t_id` varchar(200) NOT NULL COMMENT '模板id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='sso应用模板中间表';
DROP TABLE IF EXISTS `sso_template`;
CREATE TABLE `sso_template` (
  `id` varchar(200) NOT NULL COMMENT '编号',
  `name` varchar(200) NOT NULL COMMENT '模板名称',
  `type` varchar(200) NOT NULL COMMENT '模板分类',
  `img` varchar(200) NOT NULL COMMENT '模板图片',
  `create_by` varchar(64) NOT NULL COMMENT '创建者',
  `create_date` datetime NOT NULL COMMENT '创建时间',
  `update_by` varchar(64) NOT NULL COMMENT '更新者',
  `update_date` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='sso模板表';

2. Execution process

A. Register as a user (you can register a personal account or a business account)   

B. Apply for an application (may be multiple applications) and choose a different template (different templates correspond to sso single sign-on systems in different industries)

C. The administrator conducts application review (review of the information submitted by the applicant), and after the review is passed, the token information corresponding to the application is generated by encryption

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

E. Pass the token information and application information for sso unified interceptor authentication (verification whitelist)

F. Success or failure (jump to the sso login interface of the specified template)

3. Effect interface:  

Sources of information and source code

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325516639&siteId=291194637
Recommended