kofhearts
11/17/2024, 4:34 AMdef tokenRequestBody = [
code : code,
client_id : grailsApplication.config.google.client.id,
client_secret: grailsApplication.config.google.client.secret,
redirect_uri : grailsApplication.config.google.client.redirecturi,
grant_type : "authorization_code"
]
def requestEntity = new HttpEntity<>(tokenRequestBody, new HttpHeaders().setContentType(MediaType._APPLICATION_FORM_URLENCODED_))
def response = restTemplate.postForEntity(grailsApplication.config.google.auth.tokenurl, requestEntity, String)