GithubHelp home page GithubHelp logo

sso's Introduction

跨域SSO

Usage:

修改本地hosts文件,随意映射3个域名,例如:
127.0.0.1 web1.com
127.0.0.1 web2.com
127.0.0.1 localhost

prot:8080

http://web1.com:8080/WebSSODemo/index.jsp
http://web2.com:8080/WebSSODemo/index.jsp

若第二次直接登录成功,则实现跨域登录

登录原理

方式:给每个应用系统cookie's url设置该用户认证系统的ticket
sso流程

  • 用户在浏览器输入信息,登录指定应用系统

  • 到认证系统登录验证

    auth_ticket check(info){
      if(true){
      	return auth_ticket;
      }else{
      	login(info){
      		if(true){
      			return auth_ticket;
      		}else{
      			//sth else
      		}
      	}
      }
    }
    
  • 成功后返回浏览器 认证 ticket

  • 浏览器再返给指定应用系统 认证 ticket set cookie's url (方式不安全)

  • 指定应用系统返给浏览器 该应用系统 ticket

  • 重定向页面

参考:
跨域单点登录
ticket验证过程

sso's People

Contributors

breadkid avatar

Watchers

James Cloos avatar aenjon avatar

Forkers

javaer2012

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.