ifconfig
V2EX  ›  PHP

PHP 下 API 接口安全,大家怎样做的?

  •  
  •   ifconfig · May 13, 2015 · 7240 views
    This topic created in 4196 days ago, the information mentioned may be changed or developed.
    不可能每次都传user_id吧,目前是想让前端登录后提供access_token.而且这个token一段时间后会换
    然后TP框架下了解到有OAuth,但是实现起来有点麻烦,鄙人有点笨看不懂,哭.......
    Larval可以用jwt-auth,但是这个包不稳定,经常出小问题,现在发现post提交不能拿到token。

    所以跪求各位安全这方面大家如何解决的,或者用哪些包解决的?
    14 replies  •  2015-05-14 15:55:56 +08:00
    moro
    moro
    May 13, 2015
    1
    签名,参考支付类接口
    wy315700
    wy315700
    May 13, 2015
    2
    session
    GuangXiN
    GuangXiN
    May 13, 2015
    3
    access_token的意义约等于session_id
    lijinma
    lijinma
    May 13, 2015
    4
    oauth2.0 access_token https
    lijinma
    lijinma
    May 13, 2015
    5
    Laravel 我用的 dingo/api 直接支持 oauth2.0,你只需要搞一个 https 就好了
    lvfujun
    lvfujun
    May 13, 2015
    6
    如果不是机密数据. access_token 足够了.
    vibbow
    vibbow
    May 13, 2015
    7
    直接双向ssl认证......
    huigeer
    huigeer
    May 13, 2015
    8
    ssl + 1
    kslr
    kslr
    May 13, 2015
    9
    token
    oauth2
    rsa
    gdtv
    gdtv
    May 13, 2015
    10
    我以前问过类似的问题,楼主可以参考一下:
    https://v2ex.com/t/166882
    crayhuang
    crayhuang
    May 13, 2015
    11
    token+signature
    michaelzlies
    michaelzlies
    May 14, 2015
    13
    验证的时候用header

    Authorization: Bearer {token}
    ifconfig
    ifconfig
    OP
    May 14, 2015
    14
    @michaelzlies 方便留下企鹅号问你具体问题吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1754 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 12:15 · PVG 20:15 · LAX 04:15 · JFK 07:15
    ♥ Do have faith in what you're doing.