Typography

活版印字


  • Home
  • Archive
  • Categories
  • Tags
  •  

© 2020 alincode

Theme Typography by Makito

Proudly published with Hexo

JWT Authentication with AngularJS Forward 4 Web Summit (2)

Posted at 2016-03-22 JWT  JWT 

Access and Refresh Token (14:00)

  • 給 client access token 和 refresh token
  • access token 的效期要比 refresh token 短
  • refresh token 用來取得 access token
  • access token 來自於可靠的簽證機制
  • refresh token check for revocations
  • 解除驗證的方式為否決 refresh token

Access Token 黑名單 (18:00)

  • 維護 refresh token 與 access token 的關聯
  • 當 refresh token 被註銷的時候,把所有相關聯的 access token 放置黑名單
  • blacklists TTL is the expiration of the access token

e.g. redis (21:30)

Storing and Transmitting JWTs (22:20)

Tradeoffs and Concerns

  • Local Storage is not secure (XSS vulnerable)
  • 在 HTTPS 下使用 Cookie 是安全的
    HttpOnly

Secure and Painless Tradeoffs (IMO, YMMV) (27:20)

使用 Cookie 的登入驗證 (28:20)

CSRF (38:00)

Cross Site Request Forgery

解決方案 (39:10)

  • 同步 token
  • 送兩個 cookie
  • 檢查 header origin

https://www.youtube.com/watch?v=WzfJgCOMIsU

vocabulary

  • opaque (adj.)
  • revoke (v.) / revocation (n.)
  • blacklists

Share 

 Previous post: ckeditor 換行語法調整 Next post: chrome debug rendering 

© 2020 alincode

Theme Typography by Makito

Proudly published with Hexo