openid

Implementing a single login for three websites in PHP?

孤街醉人 提交于 2019-12-25 01:25:08
问题 I have a network for three websites that related. - site1.domain.com - site2.domain.com - site3.domain.com Currently, each submdomain has ~100 accounts in three separate databases. They login separately for each domain. I'd like to create site0.domain.com that lets them authenticate against one database, and then automatically log the user in to each site as they visit them. I'm not too sure how to do this. I've heard terms thrown around like Open ID and Federations and Single Sign On but I

Rails 3.0.9 + open_id_authentication

不羁岁月 提交于 2019-12-24 21:25:13
问题 I'm using open_id_authentication gem to authenticate to google. In my sessions controller I call authenticate_with_open_id(complete_identity_url, OPENID_OPTS) do |openid_result, identity_url, registration| and it returns 401 status code Unauthenticated. But it should show google page in which I must confirm access. I made example app: https://github.com/mbashirov/rails3-test, it only has code in sessions controller and routes set. That code works perfectly on rails 2.3 app. There is error?

MSIS9649: Received invalid OAuth request. The 'assertion' parameter value is not a valid access token

被刻印的时光 ゝ 提交于 2019-12-24 19:24:12
问题 I am trying to implement ADFS4 - OAuth (OpenID connect) for authentication and webapp to webapi communication. I have configured ADFS application group accordingly and use OpenIdconnectauth pipeline in webapp for authentication. In order to call webapi, if I request accesstoken using just client credential grant, it works fine as I receive the valid access token and able to get to the api. However, the access token does not have any user details in it which I need it from the webapi end. So,

OpenID in MVC3 (with Razor code)

血红的双手。 提交于 2019-12-24 19:15:17
问题 I use MVC3 with Razor code. I'm trying to use OpenID login for my application. Can anybody share the API code similar to that which Stack Overflow uses at homepage? 回答1: Here you have a full tutorial: http://weblogs.asp.net/haithamkhedre/archive/2011/03/13/openid-authentication-with-asp-net-mvc3-dotnetopenauth-and-openid-selector.aspx 来源: https://stackoverflow.com/questions/16693971/openid-in-mvc3-with-razor-code

微信公众号之获取openId

隐身守侯 提交于 2019-12-24 17:51:23
在小伙伴们开发微信公众号、小程序或者是在微信内置浏览器打开的项目时,会遇到的第一个问题就是如何获取openId,今天小编就给大家带来的是如何获取openId。    首先 我们要从微信开发者后台得到appid,这个appid是管理员在设置微信后台时获取的,而且是唯一的,而且还需要在微信后台设置回调域名。    其次  这些都准备好以后,我们就可以使用微信自带的方法获取openId:     注意:划线部分是要获取的openId和回调域名,而 location.href = url 是当页面第一次渲染时,自动获取openId,当然,这些还是准备工作 1 //截取URL字段 2 GetQueryString: function(name) { 3 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 4 var r = window.location.search.substr(1).match(reg); 5 if (r != null) { 6 return unescape(r[2]); 7 } 8 return null; 9 }, 10 getToken: function() { 11 //判断是否有openid 12 if (this.$cookieStore.getCookie("openid") ==

django-social-auth gives 502 error with Google OpenID, but only with a few users

六眼飞鱼酱① 提交于 2019-12-24 15:38:58
问题 I've been fighting with a bug for the past few weeks that's been driving me nuts. Please help! Here's the symptom: If the user is not logged in to GMail, he can login to my site (using GMail openID) without problems. This will oviously prompt the user to authenticate in GMail first. However if the user is already authenticated in GMail, he sees a 502 error page, generated by nginx. This only happens to a few users (I'm not one of them), and one of them was kind enough to report and even made

Use login_hint with OpenID

╄→尐↘猪︶ㄣ 提交于 2019-12-24 12:13:17
问题 I am trying to add the login_hint to the OpenID sign-in request for Azure AD authentication. It is not working for me, to add login_hint as a property: var properties = new AuthenticationProperties(); properties.RedirectUri = "someCallbackUrl"; properties.Dictionary.Add("login_hint ", "SomeUsername"); AuthenticationManager.Challenge(properties, OpenIdConnectAuthenticationDefaults.AuthenticationType); Adding the login_hint manually to the query string ...&login_hint=SomeUsername at least

借助云开发实现小程序订阅消息(模板消息)推送功能

落花浮王杯 提交于 2019-12-24 07:18:59
之前的模板消息推送,将在2020年1月10日下线,所以我们不得不使用订阅消息了。 我们先来看下订阅消息的官方简介。 接下来我们就来借助云开发,来快速实现小程序消息推送的功能。 一:获取模板 ID 这一步和我们之前的模板消息推送是一样的,也是先添加模板,然后拿到模板id 首先是开通订阅消息功能,很简单,如下图 由于长期性订阅消息,目前仅向政务民生、医疗、交通、金融、教育等线下公共服务开放,后期将逐步支持到其他线下公共服务业务。仅就线下公共服务这一点,长期性订阅消息就和大部分开发者无缘了。 所以我们这里只能以使用一次性订阅消息为例。 如上图,我们从公共模板库里选择一个一次性订阅的模板。然后编辑模板如下图 下图就是我们添加好的模板,下图的模板id就是我们需要的。 二,请求用户授权 我们做订阅消息授权时,只能是用户点击或者支付完成后才可以调起来授权弹窗,官方是这么要求的: 我们这里用到了wx.requestSubscribeMessage这个方法,来获取用户的授权。 1,编写index.wxml代码 2,编写index.js代码,实现点击获取授权 这一步tmplIds里的一串字符,就是我们自己添加的模板id 3,点击按钮运行效果如下 开发者工具模拟器上点击授权弹窗是这样的: 手机上的授权弹窗是这样的: 可以看到,这里显示的就是我们添加的 ‘上课提醒’的模板。 细心的同学可以看到,

How to add new column in Client table in IdentityServer 4 using CodeFirst approach?

笑着哭i 提交于 2019-12-24 07:16:03
问题 I am implementing IdentityServer4. I tried to add new field CustomerId to Client. While doing migration, it is creating new table with name as Client instead of adding new column in Clients table. namespace xx.xx.Models { [Table("Clients")] public class ApplicationClient : Client { public string CustomerId { get; set; } } } 回答1: They don't provide the ability to extend the model in this way. However ClientProperties does exist so you could use that to store custom properties as key/value

Flask OpenID unittest

这一生的挚爱 提交于 2019-12-24 04:23:50
问题 I'm trying to write a unit test for my flask app for OpenID but upon calling oid.try_login(<oid provider>, <params>) I get an error: RuntimeError: <class 'flask.testing.FlaskClient'> does not support redirect to external targets So, like every good SO user, I looked around for some solutions: Disguise oid provider using the NoExtRef flask extension. I'm not sure if this is possible at the app level since I assume flask-openid messes around with the oid url (and it just redirected me to the