passport

Passport - “Unauthenticated.” - Laravel 5.3

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I hope someone could explain why I'm unauthenticated when already has performed a successfull Oauth 2 authentication process. I've set up the Passport package like in Laravel's documentation and I successfully get authenticated, receives a token value and so on. But, when I try to do a get request on, let say, /api/user , I get a Unauthenticated error as a response. I use the token value as a header with key name Authorization , just as described in the docs. Route::get('/user', function (Request $request) { return $request->user(); })-

passport.js passport.initialize() middleware not in use

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using node with express + mongoose and trying to use passport.js with restful api. I keep getting this exception after authentication success (I see the callback url on the browser): /Users/naorye/dev/naorye/myproj/node_modules/mongoose/lib/utils.js:419 throw err; ^ Error: passport.initialize() middleware not in use at IncomingMessage.req.login.req.logIn (/Users/naorye/dev/naorye/myproj/node_modules/passport/lib/passport/http/request.js:30:30) at Context.module.exports.delegate.success (/Users/naorye/dev/naorye/myproj/node_modules

Laravel 5.3 : Passport Implementation - {“error”:“invalid_client”,“message”:“Client authentication failed”}

匿名 (未验证) 提交于 2019-12-03 01:01:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I followed the exact steps mentioned in the Laracast : What's New in Laravel 5.3: Laravel Passport to implement api authentication using oauth2 . My web.php file in the client/consumer project looks like: use Illuminate\Http\Request; Route::get('/', function () { $query = http_build_query([ 'client_id' => 2, 'redirect_uri' => 'http://offline.xyz.com/callback', 'response_type' => 'code', 'scope' => '', ]); return redirect ('http://api.xyz.com/oauth/authorize?'.$query); }); Route::get('/callback', function (Request $request){ $http= new

百度/小米/滴滴/京东,中台架构比较

寵の児 提交于 2019-12-01 17:45:52
小米中台建设实践 01 小米的三大中台建设:业务+数据+技术 业务中台--从业务说起 在中台建设中,需要规范化的服务接口、一致整合化的数据、容器化的技术组件以及弹性的基础设施。并结合业务情况,判定是否真的需要中台。 小米参考了业界优秀的案例包括移动中台、数据中台、业务中台、技术中台等,再结合其业务发展历程及业务现状,整理了中台架构的核心方法论,一是企业如何共享服务,二是如何为业务提供便利。 通过中台架构方法论和规划方法论,小米信息部提出了小米业务中台建设三年战略,包含了持续优化、构建中以及待新建的系统,纵向分为企业战略、业务执行、业务支撑、数据治理四部分。在2018年成立时,系统还是比较分散的;在2019年,主要围绕中台的架构调整、技术体系下沉,强化运营配置中心三方面,实现绝大多数的共享服务,让小米复杂的业态共享一套体系,更好的支持业务;在2020年,期望整体完善,不断的持续优化。 数据中台--数字化转型的核心 今天大家都在谈数字化转型,数字化转型是转什么?从企业内部来讲,是想如何把一切都数字化,大企业讲数字化转型是很难的一件事情,但现在有些小企业已经做得非常好。系统很简单,但是可以把企业的百十家或者几百家店铺的每一个动作、每一次上下架,甚至是每次的价格变更,每个操作人员的动作,都放到系统里面做记录。 数字化转型,业务是基础,核心是数据。在数据分析及使用过程中,小米主要面临3大问题

laravel passport client_credentials

ぐ巨炮叔叔 提交于 2019-11-27 00:40:45
我是使用 Laravel 5.4 + Dingo Api + passport/jwt 两个验证方式 目前需要用到 passport 的 client_credentials 获取 token成功之后,如果需要验证 token的有效,需要在 app\Http\Kernel.php 的 $routeMiddleware 中 添加一个 //客户端证书发放令牌验证中间件 'client_credentials' => \App\Http\Middleware\CheckClientCredentials::class, 如: protected $routeMiddleware = [ 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware