openid

Store user id in Principal or Identity? ASP.Net/OpenID

被刻印的时光 ゝ 提交于 2019-12-10 18:20:51
问题 I have an ASP.Net MVC web application using forms authentication. I am using OpenID for authentication. At the moment the moment I'm storing the openID url inside the Name of the standard GenericIdentity . I would also like to have easy access to the database id for the user. I can make a custom provider or identity by overriding the Application_AuthenticateRequest function. My question is should the database uid for the user go into the principal or the identity? Should the Name property of

How to use OpenID without asking user for his OpenID URL?

倖福魔咒の 提交于 2019-12-10 17:35:20
问题 I'm setting up an OpenID provider using DotNetOpenAuth and I'm stuck. It seems that OpenID requires that the user provides his OpenID URL first, and then the consumer would redirect him to the provider, giving the URL as a parameter (checkid_setup mode). But with google, and some other providers, it works differently. You are just redirected to a generic page where you would either sign in, or select one of the accounts you're already logged in with. Or just redirected back if you're logged

Spring Security OpenID - UserDetailsService, AuthenticationUserDetailsService

99封情书 提交于 2019-12-10 15:32:49
问题 Trying to understand what's the correct way of implementing OpenID authentication with Spring Security. public class OpenIDUserDetailsService implements UserDetailsService, AuthenticationUserDetailsService { @Override public UserDetails loadUserByUsername(String openId) throws UsernameNotFoundException, DataAccessException { // I either want user email here // or immediately delegate the request to loadUserDetails } @Override public UserDetails loadUserDetails(Authentication token) throws

How to integrate OpenId feature in .net

ⅰ亾dé卋堺 提交于 2019-12-10 15:16:07
问题 looking tutorials for integrating OpenId feature in .net 回答1: I have a feeling that this Google Code Project will be a great place to start. I just started looking at it myself a while back, I haven't had much time to dig in, but it looks promising for those not wanting to spend much time implementing. 回答2: If you just want OpenID functionality in .NET you should check out the open source package dotnetopenid. As for tutorials, there are plenty if you don't mind reading tutorials that targets

微信公众号开发中,获取用户资料的两种方式

 ̄綄美尐妖づ 提交于 2019-12-10 14:49:46
微信公众号的开发主要是在服务号环境下进行,订阅号是拿不到用户的资料的,因此,下文的讨论都基于微信服务号。 微信公众号的两个access_token 在微信的开发文档中,存在两个access_token,需要对它们加以区别。为了区分这两个token,我把它们重新命名为core_token和user_token。 core_token 就是微信公众号自己的access token,是你拥有的微信公众号作为众多公众号中的一个,向微信服务器申请的唯一凭证。这个token只需要你使用公众号的appid和appsceret就可以拿到了,文档在 这里 。但是注意,这个token的有效期只有7200秒,也就是说,微信会认为你很少用到这个token,而且它的安全级别也比较高,所以有效期比较短,每天能够申请该token的次数也被限制了。当然,微信也做了建议,如果你确实需要经常使用,那么在你的服务器上面保存它,这样避免反复的调用上面那篇文档里面的接口,消耗掉你的接口请求次数。但是有效期怎么办呢?在你的服务器上面跑一个定时任务,每隔一段时间就去检查一下这个token产生的时间与当前时间的差值,如果小于7200秒,说明还在有效期范围内,还可以继续使用,否则,就去申请一个新的替换掉老的。 core_token具体都有哪些用呢?比如创建自定义菜单接口、客服消息接口、素材管理等等。这里面还包括用户管理接口

Additional alert shows up using AppAuth to authenticate in swift4

送分小仙女□ 提交于 2019-12-10 14:40:06
问题 I am using AppAuth 0.90.0 for authentication using an external authentication server where a user can log in so the app receives appropriate authentication tokens. Since recently (after upgrade to swift 4) I get the following alert before I get sent to the authentication server: "App Name" Wants to Use "externalAuthentication.com" to Sign in" This allows the app and website to share information about you. Has someone experienced the same issue and/or has a solution so the user does not need

腾讯微博OAuth2.0认证介绍

耗尽温柔 提交于 2019-12-10 14:26:53
目录 1 腾讯微博OAuth2.0认证介绍 2 获取accesstoken的两种方式 2.1 1.Authorization code grant 2.1.1 第一步:请求code 2.1.2 第二步:请求accesstoken 2.2 2.Implicit grant 3 刷新accesstoken 4 访问API资源 4.1 请求方法 4.2 请求参数(公共部分) 5 使用案例 6 accesstoken过期时间 7 错误码说明 腾讯微博OAuth2.0认证介绍 腾讯微博开放平台,是基于腾讯微博系统,为广大开发者和用户提供的开放数据分享与传播平台。 广大开发者和用户登录平台后,就可以使用平台提供的开放API接口,创建应用从微博系统获取信息,或将新的信息传播到整个微博系统中,丰富多样的API接口和应用,加上您的智慧,将创造出无穷的应用和乐趣。 在使用腾讯微博平台提供的API前,您需要做以下两步工作: 成为开发者,并申请appkey和appsecret 授权获取accesstoken Accesstoken是第三方获得用户授权的凭证,是第三方访问api资源的票据。目前,腾讯微博采用Oauth2.0协议对第三方进行授权,相对Oauth1.0来说,Oauth2.0具有更加简单和安全特点。 关于Oauth2.0的详细介绍,请参考 Oauth2.0协议标准 。 如果您需要使用Oauth1

How access Google Contacts using OpenID in Ruby

蓝咒 提交于 2019-12-10 13:34:18
问题 I am using devise to login with omniauth, authid. When the user is logged in I get user_info: name: Riccardo Tacconi last_name: Tacconi email: email@gmail.com first_name: Riccardo uid: https://www.google.com/accounts/o8/id?id=xxxxxxxxx provider: google_apps I have found a plug-in: http://stakeventures.com/articles/2009/10/06/portable-contacts-in-ruby to get the Google Contacts. I only need to use this method: @client = PortableContacts::Client.new "http://www-opensocial.googleusercontent.com

Fake Open ID provider for testing purposes

ぐ巨炮叔叔 提交于 2019-12-10 13:25:28
问题 Like SO, I am gonna depend on many Open ID providers to provide user authentication and I will use my own authorization methods. but I'm still in development phase, and don't want to work with real OpenID providers currently, what approach can I use to test my users and their activities in the website (w/o TDD), to emulate real users but not really use Open ID providers. No need to make auto-transfer of users into real OpenID servers (when moving to production mode) since the current users

Login with gmail account through c# .net

戏子无情 提交于 2019-12-10 13:07:43
问题 i am using DotNetOpenID dll for logging my sample application through gmail authentication through c# .net code which i used was protected void Page_Load(object sender, EventArgs e) { OpenIdRelyingParty rp = new OpenIdRelyingParty(); var r = rp.GetResponse(); if (r != null) { switch (r.Status) { case AuthenticationStatus.Authenticated: NotLoggedIn.Visible = false; Session["GoogleIdentifier"] = r.ClaimedIdentifier.ToString(); Response.Redirect("About.aspx"); //redirect to main page of your