/** * Attempts to extend the lifespan of the JWT currently in use. */ public void refresh() { String jwt = getService(AccessTokenService.class).refresh().getHeaderString(RESTHeaders.TOKEN); restClientFactory.getHeaders().put(HttpHeaders.AUTHORIZATION, Collections.singletonList("Bearer " + jwt)); }
/** * Attempts to extend the lifespan of the JWT currently in use. */ public void refresh() { String jwt = getService(AccessTokenService.class).refresh().getHeaderString(RESTHeaders.TOKEN); restClientFactory.getHeaders().put(HttpHeaders.AUTHORIZATION, Collections.singletonList("Bearer " + jwt)); }