Previous articles have introduced the Spring Cloud SSO integration scenario, have also done spring + JWT + redis solutions, seamless integration of different systems, unified SSO Single Sign-on interface management, each application integration authority authentication, white list, etc. are we need to consider, Now for the above problems we do SSO Single sign-on application certification platform, designed as follows:
- Database design:
DROP TABLE IF EXISTS ' sso_app_apply '; CREATE TABLE ' sso_app_apply ' (' ID ' varchar ($) NOT null COMMENT ' number ', ' type ' varchar ($) NOT null COMMENT ' belongs to class ', ' a Pplicant ' varchar ' NOT NULL COMMENT ' applicant ', ' approver ' varchar ($) NOT null COMMENT ' approver ', ' appname ' varchar ($) NO T null COMMENT ' application name ', ' range ' varchar ($) NOT null COMMENT ' use range ', ' token ' varchar ($) 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 ' commen T ' delete tag ', ' Status ' char (1) DEFAULT ' 0 ' COMMENT ' Audit status: 0 (Pending review) 1 (Audit pass) 2 (rejected) 3 (blacklist) ', PRIMARY KEY (' id ')) engine=innodb DEF Ault Charset=utf8 comment= ' SSO application Request form ';
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. Registered user (can register personal account or business account)
B. Application application (may be multiple applications), select different templates (different templates for SSO single Sign-on system for different industries)
C. Management of the application audit (applicant Submission information audit), audit through the subsequent encryption to generate the application corresponding token information
D. Background management (application list, application review, template management, etc.)
E. Passing token information and application information for SSO Unified Interceptor Authentication (authentication whitelist)
F. Success or failure (jump to the SSO login interface for the specified template)
3. Effect interface:
spring+ Spring Cloud + SSO Single Sign-on app certification