I am fetching a JWT for authentication using REST calls. I am new to scripting but I manage to get the token with:
$params = @{"@type"="login";
"username"="username";
"password"="password";
}
Invoke-WebRequest -Uri http://[SERVER]:[PORT]/api/jwt/login -Method POST -Body $params
But how can I save the Content of the response which contains the token to a parameter which I later on can use in the header for later call?
Br, Patrik