CSJCurrent de:QUICK Zugang aktivieren: Unterschied zwischen den Versionen
(Imported from text file) |
(Edited by replacement maintenance script.) |
||
| Zeile 3: | Zeile 3: | ||
----- | ----- | ||
{{InfoBox|title=Allgemeine Informationen zum QUICK-Aktivierungsvorgang|content=Wenn Sie mehr über den QUICK-Aktivierungsprozess erfahren möchten, lesen Sie sich bitte den Artikel "[ | {{InfoBox|title=Allgemeine Informationen zum QUICK-Aktivierungsvorgang|content=Wenn Sie mehr über den QUICK-Aktivierungsprozess erfahren möchten, lesen Sie sich bitte den Artikel "[[CSSCurrent_de:Aktivierung des QUICK-Zugangs|Aktivierung des QUICK-Zugangs]]" durch. | ||
}} | }} | ||
Version vom 9. März 2022, 07:43 Uhr
Wenn Sie einen QUICK-Transfer durchführen möchten, ist es wichtig sicherzustellen, dass keine QUICK-Aktivierung notwendig ist. Eine QUICK-Aktivierung kann möglicherweise dann notwendig sein, wenn der Benutzer bereits in der Vergangenheit QUICK genutzt hat und bspw. aufgrund gelöschter Cookies keinen Zugriff mehr auf die QUICK-Zugangsdaten hat, oder wenn der Benutzer QUICK auf einem neuen Gerät nutzen möchte. Der QUICK-Zugang kann über zwei Wege aktiviert werden:
- Anforderung eines QUICK-Aktivierungscodes durch den Cryptshare Server-Administrator.
- eigenständige Generierung eines QUICK-Aktivierungscodes über ein Gerät, welcher einen gültigen QUICK-Zugang besitzt.
Der angeforderte Code kann dann dem Cryptshare Server übermittelt werden, welcher wiederum den bestehenden QUICK-Zugang auf dem aktuellen Gerät aktiviert. Unser Ziel ist es nun, den auf einem anderen Client genutzten QUICK-Zugang auf dem aktuellen Client zu aktivieren. Im folgenden Beispiel werden wir ein kleines Programm schreiben, welches Ihnen die Aktivierung von QUICK anbietet, sofern eine QUICK-Aktivierung notwendig ist. Um ein Szenario nachzustellen, welches die Aktivierung von QUICK erfordert, müssen Sie lediglich:
- über einen anderen Client (bspw. Browser oder Outlook) unter Verwendung derselben E-Mail-Addresse einen QUICK-Transfer durchführen
- die evtl. auf dem aktuellen Client vorhandene `client.store` Datei löschen
- eine Absenderverifizierung mithilfe des Artikels "Schnellstartanleitung" auf dem aktuellen Client durchführen
Somit stellen Sie sicher, dass auf dem Client, auf welchem das Programm läuft, eine QUICK-Aktivierung notwendig ist.
Ausklappen, um Quellcode einzusehen... Expand source
import com.cryptshare.api.*;
import java.nio.file.Paths;
import java.util.Locale;
import java.util.Scanner;
class Program {
private static Client client;
private static CheckVerificationResult checkVerificationResult;
public static void main(String[] args) {
try {
client = new Client(
"john.doe@example.com",
new CryptshareConnection(new WebServiceUri("https://cryptshare.example.com")),
Paths.get("C:\\Tmp"));
checkVerificationResult = client.checkVerification();
// Do not proceed if the user is not already verified.
if (!checkVerificationResult.isUserVerified()) {
throw new Exception("Cannot perform a QUICK activation if the client is not verified.");
}
// If the user already has a personal key on this server, display options to recover QUICK access.
if (checkVerificationResult.isActivationRequired()) {
displayActivationMenu();
System.out.println("Please enter the QUICK activation code below and press [Enter]:");
client.applyQuickActivationCode(new Scanner(System.in).next().trim());
} else {
String inlineText = checkVerificationResult.isQuickEnabled() ? "is enabled for QUICK" : "has not used QUICK before";
System.out.printf("The user %s; no action required.%n", inlineText);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
System.out.println("Press any key to terminate the program.");
new Scanner(System.in).next();
}
}
private static void displayActivationMenu() throws CryptshareServerException, ClientException {
System.out.println("A QUICK activation is required; please choose an option below:");
System.out.println("(1) Request QUICK activation code via the Cryptshare Server Administrator");
System.out.println("(2) Enter a QUICK activation code generated from another QUICK-enabled client");
boolean invalidInput;
do {
invalidInput = false;
final int choice = new Scanner(System.in).nextInt();
switch (choice) {
case 1:
performActivationViaAdministrator();
break;
case 2:
performActivationViaOtherClient();
break;
default:
System.out.println("Invalid choice; please repeat your input:");
invalidInput = true;
break;
}
} while (invalidInput);
}
private static void performActivationViaAdministrator() throws CryptshareServerException, ClientException {
checkVerificationResult = client.checkVerification();
// We choose to display the English QUICK recovery instructions. The texts can be freely defined on the
// Cryptshare Administration Interface via "QUICK" > "Recovery Settings" > "{Your language}".
System.out.println(checkVerificationResult.getAdministratorActivationContactDetails().get(Locale.ENGLISH));
}
private static void performActivationViaOtherClient() throws CryptshareServerException, ClientException {
checkVerificationResult = client.checkVerification();
if (checkVerificationResult.getQuickEnabledClients().size() > 0) {
System.out.println(
"The server has reported that QUICK has been last used on the following clients. Please generate a QUICK activation code using one of these clients:");
for (ClientInformation clientInformation : checkVerificationResult.getQuickEnabledClients()) {
System.out.println("Name: " + clientInformation.getName());
System.out.println("Platform: " + clientInformation.getPlatform());
System.out.println("Last use: " + clientInformation.getLastUse());
System.out.println("Last IP address: " + clientInformation.getLastIpAddress() + "\\n");
}
} else {
System.out.println(
"No other QUICK-enabled client has been reported by the server. Please choose option (1) to obtain a QUICK activation code via the Cryptshare Server Administrator.");
}
}
}