CSJCurrent en:Client Verification

Aus Cryptshare Documentation
Version vom 3. Januar 2023, 08:25 Uhr von Frorathm (Diskussion | Beiträge)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu:Navigation, Suche



If the Verification mode is set to Client Verification, any sender email address can be used to perform a transfer operation, without having to perform a verification process, as described under Sender Verification, for each individual email address. With Client Verification mode, the verification is only performed once for the Client instance as a whole, and then the Client instance can use any sender email address to perform its operations.

Please note
Using Client Verification increases the risk of abuse, since anyone with access to the verified Client instance can perform Cryptshare transfers using any sender email address. It is therefore recommended that Client Verification mode only be used if Sender Verification mode does not meet your requirements.

To verify your Client instance, first make sure that the Verification mode configured on the Cryptshare Server is set to Client Verification. Create a new Client object and enter the client id that can be received by Client#getClientId on the Cryptshare Server administration page: 21235500.png

Enter a description for your Client instance and the new Client ID, then click the "+" button to add the new client verification entry. Don't forget to save the changes. You can now use the verified Client instance with any sender email address, without the need of any further verification.

Example: Performing a Client Verification

// First create the Client instance
// Create a WebServiceUri for your Cryptshare Server
WebServiceUri serviceUri = new WebServiceUri("https://cryptshare.server.com");

// Create a CryptshareConnection instance for your WebServiceUri
CryptshareConnection connection = new CryptshareConnection(serviceUri);

// Create the Client instance with the sender's email address,
// the CryptshareConnection, and the path to the verification store.
// Since we are only doing a client verification in this example, it
// does not really matter what sender email address you enter to create
// the client, as it will not be needed for any transfer operations.
Client client = new Client("sender_email@server.com", connection, Paths.get("C:\\\\temp\\\\client.store"));

// now you can call the checkVerification() method, to first check the
// current verification status
CheckVerificationResult result = client.checkVerification();

if (verificationStatus.getVerificationMode().equals(VerificationMode.CLIENT)) {
	// Verification Mode is indeed set to Client Verification
	if (!result.isUserVerified()) {
		// Client is NOT verified, so request a new verification
		 System.out.println("Please enter the Client ID on the Administration Interface of your Cryptshare Server: " + client.getClientId());

		// The client automatically creates a new Client ID and stores it
		// in its verification store. This clientID has to then be registered on the
		// Cryptshare Server administration page.
	}
}