openid

Does OAuth “state” mitigate any genuinely dangerous attacks?

假装没事ソ 提交于 2019-12-07 00:52:27
I was using the OAuth Playground to better understand the OpenID Connect flow, and it has this to say about verifying the state parameter: The user was redirected back to the client, and you'll notice a few additional query parameters in the URL: ?state=7ymOWcwttpCfDNcs&code=Tav2TPBjSNvR8aowA3oe Since it's possible for an attacker to craft a GET request that looks similar to this, an attacker could provide your application with junk authorization codes. You need to first verify that the state parameter matches this user's session so that you can be sure you initiated the request, and are only

How can I access the Google account user_id?

狂风中的少年 提交于 2019-12-07 00:12:42
I'd like to access the user's Google account user_id for authentication , but I don't see any mention of this in the AccountManager . How can my app request the user_id ? Jason Hall Now that Google Play Services is available, you can use it to request the user's permission to access the https://www.googleapis.com/auth/userinfo.profile scope and, with the resulting access token, make a request to https://www.googleapis.com/oauth2/v1/userinfo?access_token={accessToken} to get their user ID. Chirag Shah You will need to use the Android AccountManager's getAuthToken API until Google Play services

微信企业号登录授权Java实现获取员工userid根据userid换openid

ぐ巨炮叔叔 提交于 2019-12-06 20:12:53
微信企业号登录授权Java实现获取员工userid根据userid换openid 2016年1月8日 为了方便测试 。debug 建议大家搞个花生壳或者其他的可以映射公网IP的软件。 貌似涨价了8元一个。鄙人捡了个便宜1元买的。还是个二级域名 1.设置一个菜单调用授权接口的URL (https://open.weixin.qq.com/和这个网站的是不一样的东西)获取 code https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=REDIRECTURI&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect 2.写一个方法接收上图中reurl 获取 code 与 access_token public String execute() throws Exception { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); request.setCharacterEncoding("UTF-8");

Google Apps OpenID url

拜拜、爱过 提交于 2019-12-06 19:28:52
问题 Problem: My organisation, ExampleFooBar, uses Google Apps. On our website I want to enable OpenID Single Sign-In (like StackOverflow), but only allow @examplefoobar.com email addresses to sign in. What OpenID url should I use for a Google Apps email address? As per comments on Include OpenId in drupal, the domain http://www.google.com/profiles/<username> can be used for normal Google accounts, but this doesn't work for Google Apps accounts. Google also provides the url https://www.google.com

微信公众号开发:明确什么是openid,推送模板消息java代码实现

◇◆丶佛笑我妖孽 提交于 2019-12-06 18:58:29
第一次做微信推送消息这一块,所以整理出来供大家参考,有不对或不完善的地方,希望大家多多指教。 先附上官方的开发文档https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1445241432 然后,有几个我遇到的问题,如果各位在开发的过程中遇到了,请一定要注意。 一、做微信相关的开发,一定会和openId打交道,这里需要说明一下,openId只是一个公众号和一个微信用户之间唯一存在的id,而不是微信用户的唯一id,举个栗子:你关注了公众号A以后,公众号A会得到一个你的openid,你关注公众号B,公众号B也会拿到你的openId,但是,需要注意的是,这两个openId,不是一样的。 我在开发的时候,做的是一个公众号里嵌套一个微信小程序,需要注意的是,微信小程序获取到的openid和我这个公众号产生的openId也是不一样的。 话不多说,上代码: 首先,根据微信官方api文档,建立一个传输数据类型类 public class Data_style { private String value ; private String color ; public String getValue () { return value ; } public void setValue (String value) { this . value

Secure Web Api called by PhoneGap application

天大地大妈咪最大 提交于 2019-12-06 16:36:24
I'm implementing some WebApi to upload/convert/return videos. Another developer will implement a PhoneGap application that will call my WebApi to upload/convert/show videos to users. The PhoneGap application uses OpenId to allow users to login using google and facebook. My problem is that I want to make sure the client that is calling my WebApi has been logged in on the PhoneGap app using google or facebook. I know that all I need is the client to send me a token in the request header that I can "extract" on the web api to validate the user. My question is how can my WebApi know what is the

Identity server 4 token not validate in .NetFramework Api that use Identity Server 3

↘锁芯ラ 提交于 2019-12-06 15:28:08
In my identityserver app that use idsv4 and run on port "5000" have a client new Client { ClientId = "client", // no interactive user, use the clientid/secret for authentication AllowedGrantTypes = GrantTypes.ClientCredentials, // secret for authentication ClientSecrets = { new Secret("secret".Sha256()) }, // scopes that client has access to AllowedScopes = { "api1" } }` and in my .Net Framework Api's startup class that use port no "7001" : app.UseIdentityServerBearerTokenAuthentication( new IdentityServerBearerTokenAuthenticationOptions { Authority = "http://localhost:5000", ValidationMode =

Python实现微信小程序支付功能

橙三吉。 提交于 2019-12-06 15:02:02
目录 1.支付交互流程 2.获取openid(微信用户标识) 3.支付请求 4.支付回调 5.安全问题 正文 由于最近自己在做小程序的支付,就在这里简单介绍一下讲一下用python做小程序支付这个流程。当然在进行开发之前还是建议读一下具体的流程,清楚支付的过程。 回到顶部 1.支付交互流程 当然具体的参数配置可以参考官方文档 https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=7_3&index=1 回到顶部 2.获取openid(微信用户标识) 1 import requests 2 3 from config import APPID, SECRET 4 5 6 class OpenidUtils(object): 7 8 def __init__(self, jscode): 9 self.url = "https://api.weixin.qq.com/sns/jscode2session" 10 self.appid = APPID # 小程序id 11 self.secret = SECRET # 不要跟后面支付的key搞混 12 self.jscode = jscode # 前端传回的动态jscode 13 14 def get_openid(self): 15 # url一定要拼接

Django + Google SSO openid

蓝咒 提交于 2019-12-06 14:22:16
I would like to have my application http://app.acquee.com/designer to accept a google account as a login. I found a bunch of libs for django but most work on top of existing Django authentication system that I do not use. I have my own set of user tables where I keep user info and privileges. Any suggestion on how to integrate that with the Google Openid? Seems I will have to do it manually using python-openid. Or could I use django-openid ? However, with the latter, I don't even know how to issue the discover command. Regardless, I get stuck on google's step 5 , sending a login authentication

AOL openid website verification

 ̄綄美尐妖づ 提交于 2019-12-06 14:05:14
Iam trying to use AOL openid, nut am getting "AOL is unable to verify this website" can somebody tell me the steps to avoid this error, what should I don on my end. If there is some sample code please share it - thanks in advance Regards, Navin George thank you for you answer, however I have issue in make it work, my xrds file as follows <?php header('Content-type: application/xrds+xml'); $xrdstext = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; $xrdstext =$xrdstext . "<xrds:XRDS"; $xrdstext =$xrdstext ." xmlns:xrds=\"xri://$xrds\""; $xrdstext =$xrdstext ." xmlns:openid=\"http://openid.net