openid

OpenID Connect lightweight library

无人久伴 提交于 2019-12-02 23:37:44
I'm looking for OpenID Connect (OIDC) Relying Party lightweight library that will have these routines implemented. Compose "Authentication Request" Validate "id_token" signature (including downloading certificate from metadata endpoint) Parse "id_token" JWT The only OIDC flow to be supported is so called " implicit flow " where server answers with "id_token" (and "access_token" if requested) right from authorization endpoint ( spec link ). Searching over NuGet repository seems to yield the only suitable option - OWIN middleware, and even though I can confirm it works, it would be better to

Using OpenID to log into multiple domains: Is this plan feasable?

陌路散爱 提交于 2019-12-02 23:00:59
For example: We're running a two community sites on two domains (call them example.com and example.net ). We want to be able to expand that to more domains later. We want to allow multiple types of login (OpenID, Facebook, Twitter, standard username/password). We want someone who's logged into one site to automatically be logged into the other(s). In other words, it's a bit similar to the StackExchange network. In this case, would this plan work? Set up example.com and example.net (and any later additions) as OpenID relying parties, which accept OpenID login from id.example.org only. Set up

微信网页授权

匿名 (未验证) 提交于 2019-12-02 22:56:40
现在,我们要实现一个微信内网页,通过微信访问网页时,网页会展示微信用户的个人信息。因为涉及到用户的个人信息,所以需要有用户授权才可以。当用户授权后,我们的网页服务器(开发者服务器)会拿到用户的“授权书”(code),我们用这个code向微信服务器领取访问令牌(accecc_token)和用户的身份号码(openid),然后凭借access_token和openid向微信服务器提取用户的个人信息。 第一步:用户同意授权,获取code 第二步:通过code换取网页授权access_token 第三步:拉取用户信息(需scope为 snsapi_userinfo) 那么,如何拿到用户的授权code呢? 授权是由微信发起让用户进行确认,在这个过程中是微信在与用户进行交互,所以用户应该先访问微信的内容,用户确认后再由微信将用户导向到我们的网页链接地址,并携带上code参数。我们把这个过程叫做网页回调,类似于我们在程序编写时用到的回调函数,都是回调的思想。 在微信公众号请求用户网页授权之前,开发者需要先到公众平台官网中的开发者中心页配置授权回调域名。请注意,这里填写的是域名(是一个字符串),而不是URL,因此请勿加 http:// 等协议头; 授权回调域名配置规范为全域名,比如需要网页授权的域名为:www.qq.com,配置以后此域名下面的页面 http://www.qq.com/music

What OpenID Connect authorization flow to authenticate mobile app users?

做~自己de王妃 提交于 2019-12-02 22:28:16
This question was migrated from Information Security Stack Exchange because it can be answered on Stack Overflow. Migrated 4 years ago . Learn more . I am building a cross-platform mobile app that interacts with a RESTful API, and I want to use OpenID Connect to authenticate my users. I will be building my own OpenID Connect provider server. OpenID.net claims that: OpenID Connect allows for clients of all types, including browser-based JavaScript and native mobile apps, to launch sign-in flows and receive verifiable assertions about the identity of signed-in users. However, I can't find any

微信公众号素材管理、获取用户信息、自定义菜单

别说谁变了你拦得住时间么 提交于 2019-12-02 22:11:58
  在Java开发微信公众号的基础上进行学习。学习素材管理、创建接口等操作。   所有的操作都是在获取access_token的基础上进行操作,access_token是根据appid和addsecret进行获取。(这两个参数对于个人公众号是没有的)    文中的代码只是取关键代码,完整的代码会在文章最后表明git地址。 0.获取测试账号与接口获取AccessToken   在公众号后台的开发者工具点击公众平台测试账号可以获取。 接下来以进入配置即可进行测试获取access_token: 公众平台的API调用所需的access_token的使用及生成方式说明: 1、建议公众号开发者使用中控服务器统一获取和刷新access_token,其他业务逻辑服务器所使用的access_token均来自于该中控服务器,不应该各自去刷新,否则容易造成冲突,导致access_token覆盖而影响业务; 2、目前access_token的有效期通过返回的expire_in来传达,目前是7200秒之内的值。中控服务器需要根据这个有效时间提前去刷新新access_token。在刷新过程中,中控服务器可对外继续输出的老access_token,此时公众平台后台会保证在5分钟内,新老access_token都可用,这保证了第三方业务的平滑过渡; 3、access_token的有效时间可能会在未来有调整

微信小程序登录对接Django后端实现JWT方式验证登录

匿名 (未验证) 提交于 2019-12-02 22:11:45
点击授权按钮后可以显示部分资料和头像,点击修改资料可以修改部分资料。 1.使用微信小程序登录和获取用户信息Api接口 2.把Api获取的用户资料和code发送给django后端 3.通过微信接口把code换取成openid 4.后端将openid作为用户名和密码 5.后端通过JSON web token方式登录,把token和用户id传回小程序 6.小程序将token和用户id保存在storage中 下次请求需要验证用户身份的页面时,在header中加入token这个字段 获取用户信息的方法这里不展示,可以在微信小程序文档中看到 登录方法 login: function(event) { wx.login({ success: res => { console.log(res) //请求后端换取openid的接口 http.request({ url: '/get-openid/', method: 'POST', data: { //将code传到后端 jscode: res.code }, success: res => { //获取到openid作为账号密码 console.log(res) console.log(app.globalData.userInfo) http.request({ url: '/wx-login/', method: 'POST', data:

微信支付JsApi 40163错误

匿名 (未验证) 提交于 2019-12-02 22:11:45
微信支付JsApi 40163错误 错误: 未定义数组索引:openid 。 经过检查发现是 :微信支付授权获取 openId {“errcode”:40163,“errmsg”:“code been used”,} 原因为:微信支付code 只能使用一次,当第二次重复使用时就会出现此错误。 解决相关参考:https://www.e-learn.cn/content/php/1102683 参考中的方法本人尝试无果,故自己根据原因重写: 经排查发现问题出在: WxPay.JsApiPay.php中的GetOpenid方法,源码为: /** public function GetOpenid() { } 改后代码为: /** public function GetOpenid() { } 逻辑为将获取到的openid以code为名存入session;当再次请求时,查询该次请求中以code为名的session是否存在,以此防止二次使用code。 文章来源: 微信支付JsApi 40163错误

微信支付授权获取 openId {\"errcode\":40163,\"errmsg\":\"code been used, hints: [ req_id: scqL1a02482017 ]\"}

匿名 (未验证) 提交于 2019-12-02 22:10:10
微信支付授权获取用户openId时候,返回40163,原因: 微信支付获取用户openid时,报出错误。原因是同时配置了http和https,微信网页oauth认证通知了两次 删除apache配置文件中http保留https,原因嘛就是微信通知2017-12-31日前微信开发必须使用https。 bug是在配置https以后出现的,这个提示让我最终找到了原因。 解决方法: 时都会重定向链接redirect_uri都会自动请求两次,由于并发导致了一些问题, 那么,为什么会请求两次呢?,调试时发现会访问两次,一次是301,页面重定向了,第二次跟第一次就差这个参数。加上后,不再报错。code 可以了。 https://open.weixin.qq.com/connect/oauth2/authorize?appid=xxx&redirect_uri=xxx&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect &connect_redirect=1 这个参数 文章来源: 微信支付授权获取 openId {\"errcode\":40163,\"errmsg\":\"code been used, hints: [ req_id: scqL1a02482017 ]\"}

How to create and add users to a group in Jenkins for authentication?

最后都变了- 提交于 2019-12-02 21:34:48
I choose to use "Jenkins's own user database" security realm for user login as I couldn't use LDAP in my company. And Google's OpenID has issue when you decided to change the hostname or port number to something else. And I use "Project-based Matrix Authorization Strategy" schema for my security. But I don't seem to able to create my own group, and add users to the group to manage the permission. Steve HHH According to this posting by the lead Jenkins developer, Kohsuke Kawaguchi, in 2009 , there is no group support for the built-in Jenkins user database. Group support is only usable when

提示是否进行链接跳转

可紊 提交于 2019-12-02 21:27:24
提示是否进行链接跳转 知识点: onclick="return confirm('确认跳转么?')" 代码: <a onclick="return confirm('确认禁用该粉丝么?')" href="{php echo $this->createWebUrl($filename, array('op' => 'disable', 'openid' => $fan['openid']))}" class="btn btn-primary">禁用</a> 来源: https://www.cnblogs.com/GetcharZp/p/11763005.html