Laravel 6.0 中文文档注册任意应用认证/授权服务 * * @return void */ public function boot() { $this->registerPolicies(); Auth::extend('jwt', function($app, $name, arra y $config) { 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun guard 驱动之后,就可以在配置文件 auth.php 的 guards 配置中使 用这个新的 guard 驱动: 'guards' => [ 'api' => [ 'driver' => 'jwt', 'provider' => 'users', ], ], 闭包请求 Guard 实现一个自定义的、基于 HTTP 请求的认证系统最简单的方式就是 使用 Auth:viaRequest 内置了 Auth\VerificationController 类来包含发送验 证链接和验证邮箱的必要逻辑,如果要为这个控制器注册相应路由, 可以传递 verify 选项到 Auth::routes 方法: Auth::routes(['verify' => true]); 保护路由 路由中间件可用于限定验证过的用户才能访问给定路由,我们也可以 基于这一原理限制未验证邮箱用户不能登录或者访问给定路由,0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.3 中文文档})->middleware('scope:check-status'); 最后,Passport 还支持从 JavaScript 应用访问你的 API,而不必担心访问令牌传输,Passport 通 过加密 JWT cookies 和同步 CSRF 令牌来实现这一功能,从而让开发者专注于业务开发。 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 public function boot() { $this->registerPolicies(); Auth::extend('jwt', function($app, $name, array $config) { // Return an instance of Illuminate\Contracts\Auth\Guard 之后,可以在配置文件 auth.php 的 guards 配置中使用话这个 guard: 'guards' => [ 'api' => [ 'driver' => 'jwt', 'provider' => 'users', ], ], 6、添加自定义用户提供者 如果你没有使用传统的关系型数据库存储用户信息,则需要使用自己的认证用户提供者来扩0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 5.6 中文文档*/ public function boot() { $this->registerPolicies(); Auth::extend('jwt', function($app, $name, array $config) { // 返回一个 Illuminate\Contracts\Auth\Guard 实例. 驱动之后,就可以在配置文件 auth.php 的 guards 配置中使用这个新的 guard 驱动: 'guards' => [ 'api' => [ 'driver' => 'jwt', 'provider' => 'users', ], ], 添加自定义用户提供者 本文档由 Laravel 学院提供 Laravel 学院致力于提供优质 shApiToken::class, ], 这个 Passport 中间件将会附加 laravel_token Cookie 到输出响应,这个 Cookie 包含加密过的 JWT,Passport 将使用这个 JWT 来认证来自 JavaScript 应用的 API 请求,现在,你可以发送请求到应用的 API,而不必显示传递访问令牌: axios.get('/user') .then(response0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.2 中文文档* * @return void */ public function boot() { Auth::extend('jwt', function($app, $name, array $config) { 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 定义好自己的认证 guard 之后,可以在配置文件的 guards 配置中使用话这个 guard: 'guards' => [ 'api' => [ 'driver' => 'jwt', 'provider' => 'users', ], ], 8、添加自定义用户提供者 如果你没有使用传统的关系型数据库存储用户信息,则需要使用自己的认证用户提供者来0 码力 | 377 页 | 4.56 MB | 1 年前3
Guzzle PHP v5 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1.3.27 verify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1 useful for optimizations. Types bool Default none Constant GuzzleHttp\RequestOptions::SYNCHRONOUS verify Summary Describes the SSL certificate verification behavior of a request. • Set to true to enable Default true Constant GuzzleHttp\RequestOptions::VERIFY // Use the system's CA bundle (this is the default setting) $client->request('GET', '/', ['verify' => true]); // Use a custom SSL certificate on0 码力 | 49 页 | 231.08 KB | 11 月前3
Guzzle PHP 6.5 Documentationmultipart on_headers on_stats progress proxy query read_timeout sink ssl_key stream synchronous verify timeout version Guzzle and PSR-7 Headers Accessing Headers Complex Headers Body Requests Request for optimizations. Types bool Default none Constant GuzzleHttp\RequestOptions::SYNCHRONOUS verify Summary Describes the SSL certificate verification behavior of a request. Set to true to enable Default true Constant GuzzleHttp\RequestOptions::VERIFY // Use the system's CA bundle (this is the default setting) $client->request('GET', '/', ['verify' => true]); // Use a custom SSL certificate on0 码力 | 65 页 | 311.42 KB | 11 月前3
Guzzle PHP v5 Documentationmultipart on_headers on_stats progress proxy query read_timeout sink ssl_key stream synchronous verify timeout version Guzzle and PSR-7 Headers Accessing Headers Complex Headers Body Requests Request for optimizations. Types bool Default none Constant GuzzleHttp\RequestOptions::SYNCHRONOUS verify Summary Describes the SSL certificate verification behavior of a request. Set to true to enable Default true Constant GuzzleHttp\RequestOptions::VERIFY // Use the system's CA bundle (this is the default setting) $client->request('GET', '/', ['verify' => true]); // Use a custom SSL certificate on0 码力 | 62 页 | 309.78 KB | 11 月前3
Guzzle PHP 6.5 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.3.28 verify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1 optimizations. Types bool Default none Constant GuzzleHttp\RequestOptions::SYNCHRONOUS 1.3.28 verify Summary Describes the SSL certificate verification behavior of a request. • Set to true to enable Default true Constant GuzzleHttp\RequestOptions::VERIFY // Use the system's CA bundle (this is the default setting) $client->request('GET', '/', ['verify' => true]); // Use a custom SSL certificate on0 码力 | 50 页 | 237.04 KB | 11 月前3
Guzzle PHP 5.3 Documentationused to send a request. connect_timeout is currently only supported by the built-in cURL handler. verify Summary Describes the SSL certificate verification behavior of a request. • Set to true to enable $client->get('/', ['verify' => true]); // Use a custom SSL certificate on disk. $client->get('/', ['verify' => '/path/to/cert.pem']); // Disable validation entirely (don't do this!). $client->get('/', ['verify' => false]); For example, Windows and OS X do not have a single common location for CA bundles. When setting “verify” to true, Guzzle will do its best to find the most appropriate CA bundle on your system. When using0 码力 | 63 页 | 275.75 KB | 11 月前3
Guzzle PHP 5.3 Documentationintegrity of HTTP responses using customizable validators. This plugin can be used, for example, to verify the Content-MD5 headers of responses. Service Description Commands You can use the Guzzle Command used to send a request. connect_timeout is currently only supported by the built-in cURL handler. verify Describes the SSL certificate verification behavior of a request. Set to true to enable SSL certificate bundle (this is the default setting) $client->get('/', ['verify' => true]); // Use a custom SSL certificate on disk. $client->get('/', ['verify' => '/path/to/cert.pem']); Summary: Types: Default: //0 码力 | 72 页 | 312.62 KB | 11 月前3
共 53 条
- 1
- 2
- 3
- 4
- 5
- 6













