dongqiao3927 2016-02-05 10:28
浏览 39

laravel 5身份验证中的自定义字段和自定义哈希

I have been looking all over the Internet and many articles, but things I've tried just are not working. What I want to do is very simple. I have an existing database with columns email, securepass and secureid. When a user logs in I want to check that the email, securepass and secureid they have supplied matches with the database.

The additional complication is that the securepass and secureid have to use sha256 for the authentication as that's what they are stored as in the database. I can't use Laravel's bcrypt default.

What is the best way to do this? Should I use the Eloquent ORM? Should I create my own user provider or my own user driver? I just don't know and a lot of the articles I've read don't always distinguish between Laravel 4 and 5. The database is standard MySQL.

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用