Run the following docker-compose.yml
and replace the environment variables with your own:
version: "3.9"
services:
ft_token_manager:
container_name: ft_token_manager
hostname: ft_token_manager
image: pruizca/ft_token_manager:latest
ports:
- "3000:3000"
environment:
X-SECRET: "secret generated by you that must be sent in the request header"
INTRA_AUTH_URL: "https://api.intra.42.fr/oauth/token"
INTRA_CLIENT_UID: ""
INTRA_CLIENT_SECRET: ""
INTRA_REDIRECT_URI: ""
POST /token/access
-> exchange the webflow auth code for a token
POST /token/refresh
-> exchange a refresh_token for a token
The same object returned by intra
{
"access_token":"42804d1f2480c240f94d8f24b45b318e4bf42e742f0c06a42c6f4242787af42d",
"token_type":"bearer",
"expires_in":7200,
"scope":"public",
"created_at":1443451918
}