1. laravel web 认证过程分析

参考 用户认证

Illuminate\Foundation\Auth\AuthenticatesUsers
  • \Illuminate\Contracts\Auth\StatefulGuard > \Illuminate\Auth\TokenGuard | 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 ""