oauth

SFAuthenticationSession/ASWebAuthenticationSession and logging out

偶尔善良 提交于 2020-02-16 13:26:37
问题 I'm planning to switch an app from the old OAuth flow with the SFSafariViewController to the new flow with iOS 11's SFAuthenticationSession . Logging in isn't an issue, the transfer to the new API took me a few minutes to implement. However logging out has me baffled. How? I can't find any mentioning of wanting to offer the option of logging out anywhere in the docs. Using the old SFSafariViewController to invalidate the cookies? Nope, they're not shared anymore with SFAuthenticationSession .

SFAuthenticationSession/ASWebAuthenticationSession and logging out

半腔热情 提交于 2020-02-16 13:24:31
问题 I'm planning to switch an app from the old OAuth flow with the SFSafariViewController to the new flow with iOS 11's SFAuthenticationSession . Logging in isn't an issue, the transfer to the new API took me a few minutes to implement. However logging out has me baffled. How? I can't find any mentioning of wanting to offer the option of logging out anywhere in the docs. Using the old SFSafariViewController to invalidate the cookies? Nope, they're not shared anymore with SFAuthenticationSession .

OAuth2介绍与使用

人走茶凉 提交于 2020-02-15 15:40:03
什么是OAuth2 OAuth(Open Authorization,开放授权)是为用户资源的授权定义了一个安全、开放及简单的标准,第三方无需知道用户的账号及密码,就可获取到用户的授权信息 OAuth2.0是OAuth协议的延续版本,但不向后兼容OAuth 1.0即完全废止了OAuth1.0 应用场景 第三方应用授权登录:在APP或者网页接入一些第三方应用时,时常会需要用户登录另一个合作平台,比如QQ,微博,微信的授权登录,第三方应用通过oauth2方式获取用户信息 运作流程 微信开发文档流程说明如下: 1. 第三方发起微信授权登录请求,微信用户允许授权第三方应用后,微信会拉起应用或重定向到第三方网站,并且带上授权临时票据code参数; 2. 通过code参数加上AppID和AppSecret等,通过API换取access_token; 3. 通过access_token进行接口调用,获取用户基本数据资源或帮助用户实现基本操作。 具体的实现流程图如下: OAuth2流程图 步骤说明(以微信授权登录为例) 1.用户访问第三方网站,第三方应用需要用户登录验证,用户选择微信授权登录 2.第三方应用发起微信登录授权请求 https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT

学成在线(第16天)

妖精的绣舞 提交于 2020-02-13 12:38:01
用户认证需求分析 用户认证需求分析 用户认证与授权 什么是用户身份认证? 用户身份认证即用户去访问系统资源时系统要求验证用户的身份信息,身份合法方可继续访问。常见的用户身份认 证表现形式有:用户名密码登录,指纹打卡等方式。 什么是用户授权? 用户认证通过后去访问系统的资源,系统会判断用户是否拥有访问资源的权限,只允许访问有权限的系统资源,没 有权限的资源将无法访问,这个过程叫用户授权。 单点登录需求 单点登录(Single Sign On),简称为 SSO,是目前比较流行的企业业务整合的解决方案之一。 SSO的定义是在多个应用系统中,用户只需要登录一次就可以访问所有相互信任的应用系统。 下图是SSO的示意图,用户登录学成网一次即可访问多个系统。 第三方认证 什么是第三方认证(跨平台认证)? 当需要访问第三方系统的资源时需要首先通过第三方系统的认证(例如:微信认证),由第三方系统对用户认证通 过,并授权资源的访问权限。 用户认证技术方案 单点登录技术方案 分布式系统要实现单点登录,通常将认证系统独立抽取出来,并且将用户身份信息存储在单独的存储介质,比如: MySQL、Redis,考虑性能要求,通常存储在Redis中,如下图: 单点登录的特点是: 1、认证系统为独立的系统。 2、各子系统通过Http或其它协议与认证系统通信,完成用户认证。 3、用户身份信息存储在Redis集群。

Passport-Google-OAuth Callback Not working when used in Web Service

时光怂恿深爱的人放手 提交于 2020-02-07 05:43:04
问题 I Have used Passport-Google-OAuth in Node.js web service project. I am using OAuth2Strategy. The process i have used is i call the web service method to authenticate user from his Gmail account. Initially i serve the Raw HTMl which i receive from calling the Passport-google-OAuth. Which works fine. Then i login with valid Gmail accounts. Once the Callback Url is called by google the server goes into infinite loop and calls the callback url again and again after fixed interval of time. My

spring cloud oauth2 jwt 简介

随声附和 提交于 2020-02-07 02:14:19
spring cloud oauth2 jwt 简介 *********************** jwt 使用场景 客户端携带access token向resource source请求数据时, 需要经过authorization server验证后才能进行后续处理; 使用jwt后,客户端携带jwt向resource server请求数据, 不需要转发到authorization server进行验证,提高了处理效率 *********************** jwt 数据格式 json web token(jwt)将数据包装成json对象,通过数字签名进行加密验证,常用HMAC、RSA算法进行签名认证 jwt由3部分组成: header、payload、signature, 格式为:xxx.yyy.zzz,以"."间隔 header: 令牌类型和使用算法组成,如:{"alg":"HS256","typ":"JWT"} payload: 用户信息,如:{"client_id":"user","secret":"123456","authorities":"admin","scope":"user"} signature: 签名信息,将编码后的数据进行签名,如:HMCSHA256(base64UrlEncode(header) + "." + base64UrlEncode

Unique ID for Google/Facebook Oauth

好久不见. 提交于 2020-02-04 08:50:50
问题 Are there any unique and unchanging tokens available to me from Facebook and Google? Once I get the tokens and user information back from Oauth login, it is then up to me to search my database for a user with that email and create an account if it does not exist. The problem is, even if the oauth token and therefore email is authentic, I still want to use a second token in the database query when I look up the users. Do Google and Facebook have any unique ID fields that I can bundle with the

Unique ID for Google/Facebook Oauth

拜拜、爱过 提交于 2020-02-04 08:50:39
问题 Are there any unique and unchanging tokens available to me from Facebook and Google? Once I get the tokens and user information back from Oauth login, it is then up to me to search my database for a user with that email and create an account if it does not exist. The problem is, even if the oauth token and therefore email is authentic, I still want to use a second token in the database query when I look up the users. Do Google and Facebook have any unique ID fields that I can bundle with the

Unique ID for Google/Facebook Oauth

时光毁灭记忆、已成空白 提交于 2020-02-04 08:50:12
问题 Are there any unique and unchanging tokens available to me from Facebook and Google? Once I get the tokens and user information back from Oauth login, it is then up to me to search my database for a user with that email and create an account if it does not exist. The problem is, even if the oauth token and therefore email is authentic, I still want to use a second token in the database query when I look up the users. Do Google and Facebook have any unique ID fields that I can bundle with the

Twitter Oauth URL encoding inconsistencies?

别来无恙 提交于 2020-02-04 04:49:09
问题 I'm reading the walkthrough at http://dev.twitter.com/pages/auth but there seem to be an inconsistency in encoding the callback URL. The callback is listed as: oauth_callback - http://localhost:3005/the_dance/process_callback?service_provider_id=11 The signature base string is listed as: POST&...oauth_callback%3D http%253A%252F%252Flocalhost%253A3005%252Fthe_dance%252Fprocess_callback%253Fservice_provider_id%253D11 %26oauth_consumer_key%3D... The callback appears to be double encoded here.