1313import org .springframework .stereotype .Controller ;
1414import org .springframework .util .LinkedMultiValueMap ;
1515import org .springframework .util .MultiValueMap ;
16+ import org .springframework .util .StringUtils ;
1617import org .springframework .web .bind .annotation .GetMapping ;
1718import org .springframework .web .bind .annotation .PathVariable ;
1819import 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