We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac8c7b0 commit 5103338Copy full SHA for 5103338
src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/olat/OlatLmsRestTemplate.java
@@ -33,7 +33,9 @@ public class OlatLmsRestTemplate extends RestTemplate {
33
private ClientCredentialsResourceDetails details;
34
35
public void testAuthentication() {
36
- authenticate();
+ if (this.token == null) {
37
+ authenticate();
38
+ }
39
}
40
41
public OlatLmsRestTemplate(final ClientCredentialsResourceDetails details) {
@@ -49,6 +51,7 @@ public synchronized ClientHttpResponse intercept(
49
51
final ClientHttpRequestExecution execution) throws IOException {
50
52
53
try {
54
+
55
// if there's no token, authenticate first
56
if (OlatLmsRestTemplate.this.token == null) {
57
authenticate();
0 commit comments