Oauth2

作者: 可笑可乐 | 来源:发表于2018-08-11 10:27 被阅读32次

1 Oauth2 认证方案

2 Oauth2取代CAS实现SSO

三方:oauth认证服务器 A web应用 B 浏览器 C

1、用户未登陆时,访问web应用的a页面,

http://xxx.com/a?id=xxx

2、跳转到B应用的login处理B.loginurl:

3、B.loginurl 重定向到

http://localhost:9991/uaa/oauth/authorize?client_id=demo&redirect_uri=http://localhost:9993/login&response_type=code&scope=read%20write&state=i4jYXD

3、服务器检查当前用户未登陆,重定向到login页面

oauth2/login

4、用户输入用户名密码 ,认证服务器写入cookie,

登陆成功后,在服务保存code, 重定向到客户端

http://localhost:9993/login?code=Q3LDhc&state=i4jYXD

5、web应用通过code去请求accesstoken,并重定向

http://localhost:9991/oauth2/oauth/token?grant_type=authorization_code&code=t7ol7D&redirect_uri=http://localhost:8080/web&client_id=easylocate&client_secr

access_token

userid

refresh_token

APP模式:

1、userid passowrd clientid

2、accesstoken refreshtoken

相关文章

  • Spring Security Oauth2

    oauth2理解oauth2理解oauth2参考 oauth2流程 基本概念 Resource Owner: 资源...

  • 微服务安全

    OAuth2 白话OAuth2 什么是OAuth Spring Security OAuth2

  • Spring OAuth2(JDBC)

    一、Spring OAuth2 Spring OAuth2是OAuth2协议的完整实现,如果你对OAuth2协议不...

  • OAuth2基本概念

    OAuth2 基础概念 标签(空格分隔): OAuth2 什么是OAuth2 ? OAuth2.0是OAuth协议...

  • oauth2设置token过期时间

    oauth2设置token过期时间,oauth2设置刷新token过期时间 oauth2设置token过期时间,在...

  • oauth2 介绍

    1、什么是oauth2 2、oauth2 架构图 3、oauth2 工作流程 4、优缺点

  • Oauth2授权码模式

    3.3 Oauth2授权码模式 3.3.1 Oauth2授权模式 Oauth2有以下授权模式: 授权码模式(Aut...

  • 27.OAuth2.0-Spring Cloud Securit

    Spring Cloud Security OAuth2 环境介绍 Spring Security OAuth2是...

  • Spring Cloud集成OAuth2

    Spring Cloud集成OAuth2 什么是OAuth2 OAuth2 是一个授权框架,或称授权标准,它可以使...

  • OAuth2理解

    OAuth2简介 什么是OAuth2 OAuth2是一个工业级标准的授权协议。 用于REST/API的代理授权框架...

网友评论

      本文标题:Oauth2

      本文链接:https://www.haomeiwen.com/subject/ivnrbftx.html