1. laravel api 认证过程分析

参考

$ composer require laravel/passport

phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-mcrypt (Install the Mcrypt extension in order to speed up a few other cryptographic operations.)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
lcobucci/jwt suggests installing mdanter/ecc (Required to use Elliptic Curves based algorithms.)
league/oauth2-server suggests installing indigophp/hash-compat (Polyfill for hash_equals function for PHP 5.5)
Illuminate\Foundation\Auth\AuthenticatesUsers
  • \Illuminate\Contracts\Auth\StatefulGuard > \Illuminate\Auth\GuardHelpers
  • \Illuminate\Contracts\Auth\StatefulGuard > Illuminate\Auth\SessionGuard
  • Illuminate\Support\Facades\Password > \Illuminate\Contracts\Auth\PasswordBroker > \Illuminate\Auth\Passwords\PasswordBroker

1.1. login

登录

@import "resources/laravel-auth-analyze-login.dot"

代码流程

  1. \Illuminate\Foundation\Auth\AuthenticatesUsers.login

1.2. register

注册

@import "resources/laravel-auth-analyze-register.dot"

1.3. logout

注销

代码流程

  1. \Illuminate\Foundation\Auth\AuthenticatesUsers.logout
  2. Illuminate\Auth\SessionGuard.logout

1.4. sendResetLinkEmail

发送重置密码邮件

代码流程

  1. Illuminate\Foundation\Auth\SendsPasswordResetEmails.sendResetLinkEmail
  2. \Illuminate\Auth\Passwords\PasswordBroker.sendResetLink

1.5. ResetsPasswords

重置密码

代码流程

  1. Illuminate\Foundation\Auth\ResetsPasswords.login

results matching ""

    No results matching ""