Skip to content

wm1634208243/token-refresh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Token Refresh Service

Upload token JSON files, refresh them, and download the updated result.

Requirements

  • JDK 17+
  • Maven 3.6+

Run

mvn spring-boot:run

Or build and run the jar:

mvn clean package -DskipTests
java -jar target/token-refresh-1.0.0.jar

API

POST http://localhost:8080/token/refresh

Parameter: file (multipart/form-data)

Supported uploads:

  • A single .json token file. The response is the refreshed JSON file.
  • A .zip archive containing one or more .json token files. The response is a new ZIP containing the refreshed JSON files. Directories and non-JSON files are skipped.

curl examples

Refresh one JSON file:

curl -X POST http://localhost:8080/token/refresh \
  -F "file=@token.json" \
  -o token_new.json

Refresh JSON files inside a ZIP archive:

curl -X POST http://localhost:8080/token/refresh \
  -F "file=@tokens.zip" \
  -o refreshed_tokens.zip

Notes

  • client_id is parsed automatically from the aud field in the id_token payload.
  • JSON output file names use the format APLUS-{email}.json.
  • ZIP output file names use the format refreshed_tokens_yyyyMMdd_HHmmss.zip.
  • refresh_token and id_token are updated when the refresh API returns rotated values.

About

cpa json文件重新授权工具

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages