Publishing Screens
After a screen is developed, you can share your screen with other users by publishing it.
Publishing Screens
- Log in to the DLV console.
- On the Screens page, locate the screen to be published and click on the screen.
Figure 1 Publishing a screen
You can also click in the upper right corner of the screen development page to publish the screen.
- On the displayed page, configure publish parameters.
Publish
Specifies whether others can share your created screens (see Figure 2). After the screen is published, other users can access the screen without logging in to DLV. They only need to open the browser and enter the shared link in the address box to access the screen.
Version Management
Specifies a sharable version.
- Real-time version: When the current version of screen is modified, users who are sharing it can synchronously use the latest version of screen. It is the default option and cannot be deleted.
- Historical version: When the current version of screen is modified, users who are sharing it cannot use the latest version of screen but can only use the original one.
Share Key
Specifies a screen sharing mode.
- Public sharing: If a user does not configure password access or token authentication for a screen, the screen is accessed through the shared link. The basic edition of DLV supports only the public sharing mode.
- Password access: On the Set Access Password tab page, enable password access and set a password. After the password is set successfully, other users need to enter the password when they want to access the screen through the shared link.
After Validity Period is enabled, you do not need to perform verification again within the validity period after successful verification unless the validity period expires. If this function is disabled, each access requires verification.
Figure 3 Setting the access password
- Token access: On the Set Token tab page, enable token verification.
The system randomly generates a token. You need to record it for future use. After Validity Period is enabled, you do not need to perform verification again within the validity period after successful verification unless the validity period expires. If this function is disabled, each access requires verification.
Figure 4 Setting a token
After the token for the screen is generated, you have to perform the following steps before accessing the screen:
To prevent replay attacks, ensure that token authentication is used and the time difference between the DLV client and the DLV server is within 1 minute. If the time difference exceeds 1 minute, authentication fails.
- Publish the screen and record the shared screen code (a character string behind share in the shared link).
- Connect the screen code with the current time (millisecond) and separate them with a vertical bar (|).
- Use the token to encrypt the character string in 3.b through HMAC-SHA256 base64.
- Name the time and the encrypted signature dlv_time and dlv_signature, respectively.
- Add them to querystring of the shared link.
An example is provided as follows:
Java:
package com.test; import java.security.*; import javax.crypto.*; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Base64; import java.net.URLEncoder; public class ShareWithTokenTest { public static void main(String[] args) throws Exception { System.out.println(getShareUrlWithToken("********722467a9477b5b*******", "*******r1tyy1C7Jenni3p*********")); } public static String getShareUrlWithToken(String shareID, String token){ long time = System.currentTimeMillis(); String data = shareID + "|" + time; String signature = HMACSHA256(data.getBytes(), token.getBytes()); String url = "https://console.com/dlv/vision/share/?id="+shareID +"&dlv_time="+time+"&dlv_signature="+ signature+"&locale=zh-cn®ion="; return url; } //Use HmacSHA256 for signature. public static String HMACSHA256(byte[] data, byte[] key) { try { SecretKeySpec signingKey = new SecretKeySpec(key, "HmacSHA256"); Mac mac = Mac.getInstance("HmacSHA256"); mac.init(signingKey); return URLEncoder.encode(Base64.encodeBase64String(mac.doFinal(data))); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (InvalidKeyException e) { e.printStackTrace(); } return null; } }
Replace the following parameters in the preceding code based on the site requirements: In System.out.println(getShareUrlWithToken("*****3b44722********5b888211bca", "******er1tyy1C7J*******JxeIlPz8P"), *******4722467a9477*******11bca indicates the parameter value following share in the URL, and *****er1tyy1C7******pzJxe***8P indicates the parameter value in the shared key. In String url = "https://console.g42cloud.aspiegel.com/dlv/vision/share/?id="+shareID +"&dlv_time="+time+"&dlv_signature="+ signature+"&locale=zh-cn®ion=, locale=zh-cn indicates the language ID, en-us indicates the English language, and region=xxx indicates the area where the service is deployed.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot