I'm trying to make oauth token validation in backend (Java + Spring Boot).
var restTemplate = new RestTemplate();
var req = restTemplate
.getForEntity(
"https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=" + source.getToken(),
OauthController.RspGoogle.class
);
getting body like:
static class RspGoogle implements Serializable{
String issued_to = "";
String audience = "";
String scope = "";
int expires_in = 0;
String email = "";
boolean verified_email = false;
String access_type = "";
String user_id = "";
}
On localhost is working perfectly im making, but after deployment on my testing env I'm getting error:
I/O error on GET request for "https://www.googleapis.com/oauth2/v1/tokeninfo": Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty; nested exception is javax.net.ssl.SSLException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
I cannot find any solution. pls help