spring+ Spring Cloud + SSO Single Sign-on app certification

Source: Internet
Author: User
Tags datetime

Previous articles covered the Spring cloud SSO integration scenario, the Spring + JWT + Redis solution, the seamless integration of different systems, the unified SSO single Sign-on interface management, the authorization for each application integration, whitelist, etc. are all we need to consider, Now for the above problems we do SSO Single sign-on application certification platform, designed as follows:

1. Database design: Java code   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 Category ',       ' Applicant '  varchar ($)  NOT NULL COMMENT  ' applicants ',       ' approver '  varchar ($)  NOT NULL COMMENT  ' approver ',      ' appname '  varchar  NOT NULL COMMENT  ' app 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  ' ChongBuild time ',      ' update_by '  varchar (+)  NOT NULL COMMENT  ' Updater ',       ' update_date '  datetime NOT NULL COMMENT  ' update Time ',       ' Del_flag '  char (1)  NOT NULL DEFAULT  ' 0 '  COMMENT  ' remove tag ',      ' status '  char (1)  DEFAULT  ' 0 '  COMMENT  ' Audit status: 0 (Pending review)  1 (approved)  2 (rejected)  3 (blacklist) ',     PRIMARY KEY  (' id ')   )  ENGINE=InnoDB  Default charset=utf8 comment= ' SSO application request form ';  

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 Category ', ' Applicant ' varchar ($) NOT null COMMENT ' applicant ', ' approver ' varchar ($) NOT null COMMENT ' approver ', ' appname ' varchar (20 0) NOT 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 (+) NOT null COMMENT ' updater ', ' update_date ' datetime NOT NULL COMMENT ' update Time ', ' Del_flag ' char (1) NOT NULL Defaul T ' 0 ' COMMENT ' delete tag ', ' Status ' char (1) DEFAULT ' 0 ' COMMENT ' Audit status: 0 (Pending review) 1 (approved) 2 (rejected) 3 (blacklist) ', PRIMARY KEY (' id ')) EN Gine=innodb DEFAULT Charset=utf8 comment= ' SSO application Request form '; 

Java code DROP TABLE IF EXISTS ' sso_app_template '; CREATE TABLE ' sso_app_template ' (' ID ' varchar ($) NOT null COMMENT ' number ', ' a_id ' varchar ($) NOT null COMMENT ' should With Id ', ' t_id ' varchar ($) Not NULL COMMENT ' template id ', PRIMARY KEY (' id ')) engine=innodb DEFAULT Charset=utf8 COMME Nt= ' SSO Application template Intermediate table ';

DROP TABLE IF EXISTS ' sso_app_template ';
CREATE TABLE ' sso_app_template ' (
  ' id ' varchar ($) NOT null COMMENT ' number ',
  ' a_id ' varchar ($) NOT null COMMENT ' should With Id ',
  ' t_id ' varchar ($) Not NULL COMMENT ' template id ',
  PRIMARY KEY (' id ')
) engine=innodb DEFAULT Charset=utf8 CO Mment= ' SSO Application template Intermediate table ';

  Java code   drop table if exists  ' sso_template ';   create table  ' Sso_template '   (      ' id '  varchar (+)  NOT NULL COMMENT  ' number ',       ' name '  varchar  NOT NULL COMMENT  ' template name ',      ' type '  varchar ($)  NOT NULL COMMENT  ' template category ',      ' img '  varchar ($)  NOT NULL COMMENT  ' template picture ',      ' create_by '   varchar  NOT NULL COMMENT  ' creator ',      ' create_date '  datetime  NOT NULL COMMENT  ' creation time ',      ' update_by '  varchar (+)  not  NULL COMMENT  ' Updater ',      ' update_date '  datetime not null  COMMENT  ' Update Time ',     PRIMARY KEY  (' id ')   )  engine=innodb  default charset=utf8 comment= ' SSO Template table ';  

DROP TABLE IF EXISTS ' sso_template ';
CREATE TABLE ' sso_template ' (
  ' id ' varchar ($) NOT null COMMENT ' number ',
  ' name ' varchar ($) NOT null COMMENT ' template name ' ,
  ' type ' varchar ($) NOT null COMMENT ' template class ',
  ' img ' varchar ($) NOT null COMMENT ' template picture ',
  ' create_by ' varcha R (+) not null COMMENT ' creator ',
  ' create_date ' datetime NOT NULL COMMENT ' creation time ',
  ' update_by ' varchar ($) NOT NULL COM ment ' updater ',
  ' update_date ' datetime not NULL COMMENT ' update Time ',
  PRIMARY KEY (' id ')
) Engine=innodb DEFAULT CHARS Et=utf8 comment= ' SSO Template table ';

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:





Willing to understand the framework of technology or source of friends directly seeking exchange sharing technology: 3133806896


Some of the distributed solutions, the friends who are willing to know can find our team to discuss


More detailed source code references

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: info-contact@alibabacloud.com 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.