package com.example.anothersignintest;   import java.io.IOException;   import com.google.android.gms.auth.GoogleAuthException; import com.google.android.gms.auth.GoogleAuthUtil; import com.google.android.gms.auth.UserRecoverableAuthException; import…
http://stackoverflow.com/questions/10827920/google-oauth-refresh-token-is-not-being-received The refresh_token is only provided on the first authorization from the user. Subsequent authorizations, such as the kind you make while testing an OAuth2 int…
jose4j / JWT Examples View History JSON Web Token (JWT) Code Examples Producing and consuming a signed JWT Using an HTTPS JWKS endpoint Using JWKs X.509 Something else? (X.509 Certificates at some HTTPS endpoint, maybe) Two-pass JWT consumption Produ…
我们平常也经常使用QQ,微信账号,登录其他应用.最近公司让我给网站添加一个谷歌账号登录.我来这里记录一下,莫怪~~~莫怪~~~ 1. 申请一个账号登录ID:  https://developers.google.com/identity/sign-in/web/sign-in#before_you_begin 2. 拿到ID: var clientId = "**********.apps.googleusercontent.com"; 3. 在官网https://developers…
AngularJS is an awesome javascript framework. With it’s $resource service it is super fast and easy to connect your javascript client to a RESTful API. It comes with some good defaults to create a CRUD interface. However if you are using an API, whic…
1.设备没有授权,原因是 这个client_id的值就是数据库wk_oauth_clients 的主键ID,查看下表是否有这条数据…
@Bean public CorsFilter corsFilter() { final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); final CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); // 允许cookies跨域 config.addAllowedO…
原文地址:http://www.ruanyifeng.com/blog/2014/05/oauth_2_0.html OAuth是一个关于授权(authorization)的开放网络标准,在全世界得到广泛应用,目前的版本是2.0版. 本文对OAuth 2.0的设计思路和运行流程,做一个简明通俗的解释,主要参考材料为RFC 6749. 一.应用场景 为了理解OAuth的适用场合,让我举一个假设的例子. 有一个"云冲印"的网站,可以将用户储存在Google的照片,冲印出来.用户为了使用该服…
一.背景:页面为何会卡? 1.1 等待时间长(性能) 项目本身包/第三方脚本比较大. JavaScript 执行阻塞页面加载. 图片体积大且多. 特别是对于首屏资源加载中的白屏时间,用户等待的时间就越长,用户感知到页面的速度就越慢.麻省理工学院的 Richard Larson 在讲话中指出,"人类将被动等待高估了 36%"(https://mazey.cn/t/em).这意味着用户感觉到的等待时间比开发工具记录的长得多. 1.2 看起来卡(体验) 页面结构不断调整,不连贯.抖动的页面往…
很久很久以前, 网上流传着一个免费的,识别率暴高的,稳定的 Speech To Text API, 那就是Google Speech API. 但是最近再使用的时候,总是返回500 Error. 后来通过查看源码知道需要增加一个参数:key=.... 可能是为了防止滥用吧. 并且, 最近Chrome另外发布了一个长连接实时的识别接口, 这对开发者来说真是巨大的福音啊. 在这里主要对这两个接口的用法进行介绍. 博客: http://www.cnblogs.com/jhzhu 邮箱: jhzhuus…