Git Product home page Git Product logo

cuis-jwt's Introduction

README

Note
默认端口: 9966;
认证的时候默认没认证密码,可以自行在 RestLoginProcessingFilter 中添加密码认证逻辑。

登陆

用户名登陆,获取 tokenrefreshToken

POST http://127.0.0.1:9966/api/auth/login
Content-Type: application/json
Cache-Control: no-cache

{
    "username": "[email protected]",
    "password": "xxx"
}

获取个人信息

通过 token 获取个人信息

GET http://127.0.0.1:9966/api/me/ HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJsaTdudXhAZ21haWwuY29tIiwic2NvcGVzIjpbIlJPTEVfUFJFTUlVTV9NRU1CRVIiXSwiaXNzIjoiaHR0cDovL2xpN251eC5jb20iLCJpYXQiOjE1MzkxNDAxOTksImV4cCI6MTUzOTE0MTA5OX0.1I03tQqwItjl7fbVRbxQGNpk1vbV7R3o5i0bQo73QGiHF8g-2bP5qzBNYV8r-aM9fGUUTIwa_DTXm5KF4143cw
Cache-Control: no-cache

刷新 token

通过 refreshToken 刷新 token

GET http://127.0.0.1:9966/api/auth/token HTTP/1.1
Authorization: Bearer xeyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJsaTdudXhAZ21haWwuY29tIiwic2NvcGVzIjpbIlJPTEVfUkVGUkVTSF9UT0tFTiJdLCJpc3MiOiJodHRwOi8vbGk3bnV4LmNvbSIsImp0aSI6IjUzNGM3Mzk5LTRkMjktNDQyOS05N2UwLTQ4MzBkMDBkYWY0NiIsImlhdCI6MTUzOTE0MDE5OSwiZXhwIjoxNTM5MTQzNzk5fQ.PrGEWh4oQGiMdXPN7T6tL7Df_C3pMpN7FZ6-meexR_98PyNKLuLpbtQwO9wGyY3Fc_IMjNhX1Z3n2yFIdKKiRQ
Cache-Control: no-cache

访问无需认证的 url

GET http://127.0.0.1:9966/api/skip/ HTTP/1.1

cuis-jwt's People

Contributors

li7nux avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.