oauth

Apple Sign-In: How to use it for custom server endpoint authentication?

不打扰是莪最后的温柔 提交于 2020-01-21 08:57:07
问题 My use case is that once I have a user signed into my app, I use the Oauth token, resulting from the sign-in, when I make endpoint calls from my app to my custom server-- to authenticate the caller. E.g., I use Google Sign In in this way. This method (e.g., with Google Sign In) has several useful properties: 1) Updated tokens are created automatically on the client app. 2) My custom server can easily verify the validity of the token, using Google's endpoints. 3) Initial token verification can

Get contacts using Yahoo Contacts API

旧街凉风 提交于 2020-01-21 05:29:25
问题 I followed these steps "http://developer.yahoo.com/oauth/guide/oauth-auth-flow.html" and I got oauth token and GUID from authenticated user. Now I am trying retrieve all contacts through GUID as I have seen on searchs for web using this url "http://social.yahooapis.com/v1/user/GUID_HERE/contacts" and passing authorization data via headers but I just get this response: <?xml version='1.0' encoding='UTF-8'?><yahoo:errorxmlns:yahoo='http://yahooapis.com/v1/base.rng' xml:lang='en-US'><yahoo

关于 Spring Security OAuth2 中 CORS 跨域问题

你。 提交于 2020-01-21 02:51:07
CORS 是一个 W3C 标准,全称是”跨域资源共享”(Cross-origin resource sharing)。它允许浏览器向跨源服务器,发出XMLHttpRequest请求,从而克服了 AJAX 只能同源使用的限制( 跨域资源共享 CORS 详解 )。 解决 CORS 跨域方法大致有如下几类: 使用 Nginx 代理配置转发请求。 在 Zuul ( 配置允许敏感头信息等 ) 或 Spring Cloud Gateway 层配置跨域网关路由转发到资源端不涉及跨域。 Spring Boot 资源端配置以支持跨域(适用于无网关场景)。 Spring Boot 实现 CORS 跨域 ( 官方 ) 单个方法的跨域支持,可以使用 @CrossOrigin 的注解实现 采用 JavaConfig 实现 采用 Filter 但是如果项目中包含 Spring Security 就会有 401 的问题,Spring Security 本身是通过 Filter 实现的,如果没有对其单独做 CORS 的处理,在 Web Security 报错 401 的时候是不会返回相应的 CORS 的字段的。这会导致出现的 401 错误成为了一个无法进行跨域的错误,导致前端程序无法正常的处理 401 相应 。对于spring security oauth2 默认接口,例如 /oauth/token 跨域问题

OWIN/OAuth2 3rd party login: Authentication from Client App, Authorization from Web API

牧云@^-^@ 提交于 2020-01-20 21:46:21
问题 I am trying to create a Web API that allows the API's clients (native mobile apps) to login using a 3rd party cloud storage provider. I'm using the following general flow from Microsoft: Here is what I am trying to achieve: I am using the default ASP.NET Web API Visual Studio template with external authentication, along with the OWin.Security.Providers Nuget package for Dropbox login functionality, and the existing built-in login functionality for Google (Drive) and Microsoft (OneDrive). The

OWIN/OAuth2 3rd party login: Authentication from Client App, Authorization from Web API

你。 提交于 2020-01-20 21:46:11
问题 I am trying to create a Web API that allows the API's clients (native mobile apps) to login using a 3rd party cloud storage provider. I'm using the following general flow from Microsoft: Here is what I am trying to achieve: I am using the default ASP.NET Web API Visual Studio template with external authentication, along with the OWin.Security.Providers Nuget package for Dropbox login functionality, and the existing built-in login functionality for Google (Drive) and Microsoft (OneDrive). The

聊聊统一身份认证服务

无人久伴 提交于 2020-01-20 19:46:57
导读 当企业的应用系统逐渐增多后,每个系统单独管理各自的用户数据容易形成信息孤岛,分散的用户管理模式阻碍了企业应用向平台化演进。当企业的业务发展到一定规模,构建统一的标准化账户管理体系将是必不可少的,因为它是企业云平台的重要基础设施,能够为平台带来统一的帐号管理、身份认证、用户授权等基础能力,为企业带来诸如跨系统单点登录、第三方授权登录等基础能力,为构建开放平台和业务生态提供了必要条件。 背景 公司原有的各个业务系统都是通过域账户来打通的,随着公司平台化、开放战略的推进,公司对外提供的服务必须具备对外集成与被集成的能力,在这种需求下,单纯的内部账户打通已显然不能满足需求,提供统一的账户管理、身份认证与授权势在必行。 以我们的DevOps平台研发协同平台为例,平台要面向ISV合作伙伴开放, 首先面临的就是账户问题,不单单是研发协同平台自身要向ISV合作提供服务,围绕研发协同平台的其他服务(例如Jira, Confluence, Jenkins, Sonar)也要面向ISV合作伙伴提供服务,这就要求面向ISV合作伙伴必须提供统一的账户体系。 需求 统一身份管理 统一身份管理是整个平台帐号和权限管控的基础,平台下所有系统的账户管理、身份认证、资源授权等行为都经由系统统一处理,提供帐号密码管理、基本资料管理、资源管理、授权管理、客户端管理等功能。统一身份管理基于统一身份治理的概念

Setup OWIN dynamically (by domain)

做~自己de王妃 提交于 2020-01-20 04:57:25
问题 We are trying to setup a white label on our project that uses OWIN(includes FB, google, Live logins). Is there a way to setup their API credential dynamically, say if they changes the domain the settings will change. I think owin loads earlier than MVC? Is there a way that we can load it on Global.asax(Request)? public partial class Startup { public void Configuration(IAppBuilder app) { ConfigureAuth(app); } } UPDATE: In other words a single Application will host many domains and sub domains

Using OAuth 2.0 to Access Google APIs

烈酒焚心 提交于 2020-01-20 04:38:43
Using OAuth 2.0 to Access Google APIs Google APIs use the OAuth 2.0 protocol for authentication and authorization. Google supports common OAuth 2.0 scenarios such as those for web server, installed, and client-side applications. To begin, obtain OAuth 2.0 client credentials from the Google API Console . Then your client application requests an access token from the Google Authorization Server, extracts a token from the response, and sends the token to the Google API that you want to access. For an interactive demonstration of using OAuth 2.0 with Google (including the option to use your own

权限认证基础:区分Authentication,Authorization以及Cookie、Session、Token

烂漫一生 提交于 2020-01-19 01:23:08
1. 认证 (Authentication) 和授权 (Authorization)的区别是什么? 这是一个绝大多数人都会混淆的问题。首先先从读音上来认识这两个名词,很多人都会把它俩的读音搞混,所以我建议你先先去查一查这两个单词到底该怎么读,他们的具体含义是什么。 说简单点就是: 认证 (Authentication): 你是谁。 授权 (Authorization): 你有权限干什么。 稍微正式点(啰嗦点)的说法就是: Authentication(认证) 是验证您的身份的凭据(例如用户名/用户ID和密码),通过这个凭据,系统得以知道你就是你,也就是说系统存在你这个用户。所以,Authentication 被称为身份/用户验证。 Authorization(授权) 发生在 Authentication(认证) 之后。授权嘛,光看意思大家应该就明白,它主要掌管我们访问系统的权限。比如有些特定资源只能具有特定权限的人才能访问比如admin,有些对系统资源操作比如删除、添加、更新只能特定人才具有。 这两个一般在我们的系统中被结合在一起使用,目的就是为了保护我们系统的安全性。 2. 什么是Cookie ? Cookie的作用是什么?如何在服务端使用 Cookie ? 2.1 什么是Cookie ? Cookie的作用是什么? Cookie 和

【知识库】-通俗理解OAuth2.0协议用于第三方登陆

巧了我就是萌 提交于 2020-01-17 13:02:46
   转载:     OAuth 2.0 的一个简单解释  作者:阮一峰   传送门     OAuth 2.0 的四种方式  作者:阮一峰   传送门 OAuth 2.0 的一个简单解释     OAuth 2.0 是目前最流行的授权机制,用来授权第三方应用,获取用户数据。   这个标准比较抽象,使用了很多术语,初学者不容易理解。其实说起来并不复杂,下面我就通过一个简单的类比,帮助大家轻松理解,OAuth 2.0 到底是什么。 我住在一个大型的居民小区。 小区有门禁系统。 进入的时候需要输入密码。 我经常网购和外卖,每天都有快递员来送货。我必须找到一个办法,让快递员通过门禁系统,进入小区。 如果我把自己的密码,告诉快递员,他就拥有了与我同样的权限,这样好像不太合适。万一我想取消他进入小区的权力,也很麻烦,我自己的密码也得跟着改了,还得通知其他的快递员。 有没有一种办法,让快递员能够自由进入小区,又不必知道小区居民的密码,而且他的唯一权限就是送货,其他需要密码的场合,他都没有权限? 一、快递员问题 于是,我设计了一套授权机制。 第一步,门禁系统的密码输入器下面,增加一个按钮,叫做"获取授权"。快递员需要首先按这个按钮,去申请授权。 第二步,他按下按钮以后,屋主(也就是我)的手机就会跳出对话框:有人正在要求授权。系统还会显示该快递员的姓名、工号和所属的快递公司。 我确认请求属实