Merge branch 'dev-1.3' into SEBSERV-308
This commit is contained in:
commit
9416ffbb5b
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,8 @@ public class OlatLmsRestTemplate extends RestTemplate {
|
|||
ClientHttpResponse response = execution.execute(request, body);
|
||||
log.debug("OLAT [regular API call] {} Headers: {}", response.getStatusCode(), response.getHeaders());
|
||||
// If we get a 401, re-authenticate and try once more
|
||||
if (response.getStatusCode() == HttpStatus.UNAUTHORIZED) {
|
||||
if (response.getStatusCode() == HttpStatus.UNAUTHORIZED ||
|
||||
response.getStatusCode() == HttpStatus.FORBIDDEN) {
|
||||
authenticate();
|
||||
request.getHeaders().set("X-OLAT-TOKEN", OlatLmsRestTemplate.this.token);
|
||||
response = execution.execute(request, body);
|
||||
|
|
Loading…
Reference in a new issue