Skip to content

Commit d065377

Browse files
committed
TODO for new tiqr-java-connector version
1 parent 7502314 commit d065377

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tiqr-mock/src/main/java/tiqr/org/TiqrEndpoint.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.springframework.stereotype.Controller;
1414
import org.springframework.util.LinkedMultiValueMap;
1515
import org.springframework.util.MultiValueMap;
16+
import org.springframework.util.StringUtils;
1617
import org.springframework.web.bind.annotation.GetMapping;
1718
import org.springframework.web.bind.annotation.PathVariable;
1819
import org.springframework.web.bind.annotation.RequestParam;
@@ -129,7 +130,9 @@ public ModelAndView authentications() {
129130
public ModelAndView authentication(@PathVariable("sessionKey") String sessionKey) {
130131
Authentication authentication = findAuthentication(sessionKey);
131132
Registration registration = findRegistration(authentication.getUserID());
132-
String decryptedSecret = secretCipher.decrypt(registration.getSecret());
133+
String secret = registration.getSecret();
134+
//TODO: When using 4.0.0 of tiqr-java-connector then use the encryptedSecret
135+
String decryptedSecret = secretCipher.decrypt(secret);
133136
String ocra = OCRA.generateOCRA(decryptedSecret, authentication.getChallenge(), sessionKey);
134137
Map<String, Object> body = Map.of(
135138
"authentication", authentication,
@@ -149,6 +152,7 @@ public View authenticated(@PathVariable("sessionKey") String sessionKey,
149152
HttpHeaders headers = getHttpHeaders();
150153

151154
Registration registration = findRegistration(authentication.getUserID());
155+
//TODO: When using 4.0.0 of tiqr-java-connector then use the encryptedSecret
152156
String decryptedSecret = secretCipher.decrypt(registration.getSecret());
153157
String ocra = OCRA.generateOCRA(decryptedSecret, authentication.getChallenge(), sessionKey);
154158

0 commit comments

Comments
 (0)