zoukankan      html  css  js  c++  java
  • xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

    React 权限管理

    react in depth

    JWT token

    access_token & refresh_token

    access token & refresh token

    const json = {
      password: "123456",
      username: "imooc",
    };
    
    fetch(`http://qinchenju.com/koa/cms/user/login`, {
      // talelin
      headers: {
        "Content-Type": "application/json",
        // "x-csrf-token": csrftoken,
      },
      // credentials: "include",// cookie
      // credentials: "same-origin",
      method: "POST",
      mode: "cors",
      body: JSON.stringify(json),
    })
    .then(res => res.json())
    .then(json => log(`json`, json))
    .catch(err => log(`error`, err));
    
    // JWT
    
    /* 
    
    {
      "access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDEyMDUxNDksImlkZW50aXR5Ijo1LCJzY29wZSI6ImxpbiIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE2MDEyMDE1NDl9.ts7QZN7I0AdM6_C78YiaaUxuh03O4CdALZkZIgFi8Io",
      "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDM3OTM1NDksImlkZW50aXR5Ijo1LCJzY29wZSI6ImxpbiIsInR5cGUiOiJyZWZyZXNoIiwiaWF0IjoxNjAxMjAxNTQ5fQ.CStldDP-AwvSvDaMLvS8sGikhdWmii1DBozxHwFdNEg"
    }
    
     */
    
    

    React Authority Management

    JWT

    https://bezkoder.com/react-jwt-auth/

    refs



    ©xgqfrms 2012-2020

    www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


  • 相关阅读:
    elasticsearch之建议器Suggester
    elasticsearch,kibana之相关配置
    elasticsearch之分析过程
    elasticsearch之mappings
    elasticsearch for Mac OS
    项目精讲
    博客园项目开发流程
    Django之auth模块
    DJango中间件
    DJango之模板层
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/13740929.html
Copyright © 2011-2022 走看看