Skip to content

Commit

Permalink
SEBSERV-467 fixed only authenticate on testing if no token
Browse files Browse the repository at this point in the history
  • Loading branch information
anhefti committed Oct 2, 2023
1 parent ac8c7b0 commit 5103338
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public class OlatLmsRestTemplate extends RestTemplate {
private ClientCredentialsResourceDetails details;

public void testAuthentication() {
authenticate();
if (this.token == null) {
authenticate();
}
}

public OlatLmsRestTemplate(final ClientCredentialsResourceDetails details) {
Expand All @@ -49,6 +51,7 @@ public synchronized ClientHttpResponse intercept(
final ClientHttpRequestExecution execution) throws IOException {

try {

// if there's no token, authenticate first
if (OlatLmsRestTemplate.this.token == null) {
authenticate();
Expand Down

0 comments on commit 5103338

Please sign in to comment.