openid

OAuth协议与OpenID协议的区别

北城余情 提交于 2019-12-15 17:19:37
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> OAuth关注的是 authorization ;而OpenID侧重的是 authentication 。从表面上看,这两个英文单词很容易混淆,但实际上,它们的含义有本质的区别: authorization: n. 授权,认可;批准,委任 authentication: n. 证明;鉴定;证实 OAuth关注的是授权,即:“用户能做什么”;而OpenID关注的是证明,即:“用户是谁”。 如果混淆了OAuth和OpenID的含义,后果很严重。以国内某网站开发的应用为例:它的功能是通过OAuth授权让新浪微博和豆瓣的用户使用各自的身份发表评论, 如下图所示(错误的把OAuth当做OpenID使用) : 此类应用属于身份证明问题,本应该通过OpenID来实现,但因为错误的使用了OAuth,从而带来安全隐患 :设想一下用户只是在网站上发表了评论而已, 但却赋予了网站随意操作自己私有数据的权利!这就好比: 快递员送包裹,为了证明收件人的身份,原本你只要给他看一下身份证即可,可你却把防盗门钥匙都给他 了!Oh,My God! 来源: oschina 链接: https://my.oschina.net/u/168814/blog/488653

OpenID和OAuth有什么区别?

北城以北 提交于 2019-12-15 17:15:32
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我真的想了解OpenID和OAuth之间的区别吗? 也许他们是两个完全不同的东西? #1楼 OpenID(主要)用于标识/身份验证,因此 stackoverflow.com 知道我拥有 chris.boyle.name (或任何地方),因此我可能是昨天拥有 chris.boyle.name 并获得一些声望点的同一个人。 OAuth旨在授权代表您执行操作,以便 stackoverflow.com (或任何地方)可以在不知道您的Twitter密码的情况下自动代表您发送Tweet权限。 #2楼 OpenID 是关于身份验证(即证明你是谁), OAuth 是关于授权(即授予对功能/数据/等的访问权限而不必处理原始身份验证)。 OAuth可以在外部合作伙伴站点中使用,以允许访问受保护的数据,而无需重新验证用户。 从用户的角度来看 ,博客文章“ OpenID与OAuth”从用户的角度 对两者进行了简单的比较,“ OAuth-OpenID:如果你认为他们是同一件事,你就会吵到错误的树 ”了解更多信息关于它。 #3楼 OAuth的 仅用于委派 authorization - 意味着您授权第三方服务访问以使用个人数据,而无需提供密码。 此外,OAuth“会​​话”通常比用户会话更长寿。 意味着OAuth旨在允许授权

崛起于Springboot2.X + 微信测试账号获取openid(63)

北城以北 提交于 2019-12-15 15:49:36
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 《SpringBoot2.X心法总纲》 目的:申请一个微信测试号,调用各种接口,如获取openid等简单使用。 1、准备微信测试账号 可以看下这个博客, 如何申请微信号测试账号,进行微信开发 然后获取一个免费的外网,看下这个博客, Mac下NATAPP将内网映射到外网 2、启动natapp 环境配置好了,首先我们要确认我们项目的端口号,应该与natapp的端口号一样,因为我们的项目是8088,所以对应的如下: 上面的博客没有说明这一点,我们直接用http://9fvs5p.natappfree.cc代替localhost:8088测试接口成功就成功了。 3、测试token 我的配置token如图: 那么对应项目接口地址一样的, @Controller @RequestMapping(value = "/wx") @Slf4j public class WxController { @GetMapping("testToken.html") public void getToken(String signature, String timestamp, String nonce, String echostr, HttpServletResponse response) throws

Sign in with Azure AD B2C to Xamarin Android app

随声附和 提交于 2019-12-14 03:58:54
问题 After a week of researching authentication principles that would work with Azure AD B2C using the Xamarin to target the Android platform (not Xamarin.Forms), I'm finally asking for a little advice. I've got an activity with a 'Sign in' button and I would like to log in to Azure on the button's touch event. Ideally I'd want to receive a token after the login steps are completed. Here is the code that I have so far: public class MainActivity : Activity { public TaskCompletionSource<bool>

Multiple OpenIdConnect authorization in .net core

核能气质少年 提交于 2019-12-14 03:54:55
问题 I have problem with having multiple OpenIdConnect authorization in .net core What I want to achieve: Imagine 2 openid providers OpenID-Main, OpenID-Special; both returns id tokens, roles etc. Now Imagine most of the times I want my user to log through OpenID-Main, which is simple: .AddOpenIdConnect("Main", "Main", options => { options.Authority = "OpenID-Main-url"; options.ClientId = "OpenID-Main-d"; options.ClientSecret = "OpenID-Main-secret"; //some other options } then i can just use

The remote certificate is invalid according to the validation procedure - can`t solve this

旧街凉风 提交于 2019-12-13 23:59:09
问题 I hang unsuccessfully for days on this problem and not a single answer to different posts at different websites helped me so solve it. I am working on a Windows 10 System and implementing with VisualStudio 2017. With AspNetCore I`ve implemented the following projects: 1.) Web.AuthServer: IdentityServer4 for authentication. 2.) Web.ApiServer: The first SignalR-Server. 3.) Web.ApiSwitch: The second SignalR-Server. It has a HostedService with 2 SignalR-Clients as a "bridge" between the two

How to Migrate Yahoo users from OpenId to OAuth

拜拜、爱过 提交于 2019-12-13 21:13:14
问题 I'm using App Engine / java. I need to migrate my Yahoo users from OpenID 2.0 to OAuth 2.0 login (OpenID Connect), because OpenID 2.0 Relying Party support for logging in with OpenID 2.0 accounts in to App Engine will be turned off. For my Yahoo users, I have following information in my datastore: federated identity: https://me.yahoo.com/a/... email address When I implement Sign-in with Yahoo using OAuth, I need to use the information provided by the OAuth process to identify the existing

DotNetOpenID - Identity Provider behind a firewall?

感情迁移 提交于 2019-12-13 17:49:52
问题 Looking at the OpenID protocol, it appears that the relying party needs to send a request to the identity provider. In our situation, this is not exactly ideal since the identity provider is behind a firewall-- our server will not be able to make the request. However, the user accessing our website (client-side, e.g. javascript or redirects) would be able to. So my question is this: does OpenID support an identity provider behind the firewall? If not, is there a secure way of accomplishing

Failing OpenID Connect middleware - how to debug?

≡放荡痞女 提交于 2019-12-13 16:12:13
问题 I set up a very simple ASP.NET MVC 5 application that tries to authenticate a user through an OpenID provider in Authorization Code mode. I'm able to log in and the server returns a code in the redirect URL querystring and a nonce cookie. However, back on the client application the user is not authenticated ( User.Identity.IsAuthenticated false), has no claims and called controller Action that has an Authorize attribute is never carried out. Browser stays on the redirect URL page which is the

Google Federated Login (hybrid OpenID+OAuth) with wildcard realm

时光总嘲笑我的痴心妄想 提交于 2019-12-13 14:09:18
问题 I'm trying to implement Google's OpenID+OAuth protocol, and it doesn't work when openid.realm contains a wildcard: openid.realm: http://*.example.com openid.ns.oauth = http://specs.openid.net/extensions/oauth/1.0 openid.oauth.consumer = www.example.com openid.oauth.scope = https://www.googleapis.com/auth/userinfo.profile The OpenID process works as expected, but the OAuth extension is silently ignored (no request_token in the response; no error either). As per the documentation this seemed