本文整理汇总了PHP中LucaDegasperi\OAuth2Server\Facades\Authorizer::getResourceOwnerID方法的典型用法代码示例。如果您正苦于以下问题:PHP Authorizer::getResourceOwnerID方法的具体用法?PHP Authorizer::getResourceOwnerID怎么用?PHP Authorizer::getResourceOwnerID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LucaDegasperi\OAuth2Server\Facades\Authorizer
的用法示例。
在下文中一共展示了Authorizer::getResourceOwnerID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handle
public function handle($request, Closure $next, $role)
{
$id = Authorizer::getResourceOwnerID();
$user = $this->userRepository->find($id);
if ($user->role != $role) {
abort('403', 'Access Forbidden');
}
return $next($request);
}
示例2: store
public function store(CheckoutRequest $request)
{
$id = Authorizer::getResourceOwnerID();
$data = $request->all();
$clientId = $this->userRepository->find($id)->client->id;
$data['client_id'] = $clientId;
$order = $this->orderService->create($data);
return $this->repository->with($this->with)->find($order->id);
}
示例3: geo
public function geo(Request $request, Geo $geo, $id)
{
$idDeliveryman = Authorizer::getResourceOwnerID();
$order = $this->repository->getByIdAndDeliveryman($id, $idDeliveryman);
$geo->lat = $request->get('lat');
$geo->long = $request->get('long');
event(new GetLocationDeliveryman($geo, $order));
return $geo;
}
示例4: authenticated
public function authenticated()
{
return $this->clientService->userRepository->skipPresenter(false)->find(Authorizer::getResourceOwnerID());
}