生成视频重定向链接 @param link 链接 @param tagId 标签Id -1表示管理后台打开链接,不校验权限 @param secret 密钥 16位字符 @return
(String link,Long tagId,String secret)
| 70 | * @return |
| 71 | */ |
| 72 | public static String createVideoRedirectLink(String link,Long tagId,String secret){ |
| 73 | JsonComponent jsonComponent = (JsonComponent)SpringConfigTool.getContext().getBean("jsonComponent"); |
| 74 | Map<String,String> parameterMap = new HashMap<String,String>(); |
| 75 | parameterMap.put("link", link); |
| 76 | parameterMap.put("tagId", String.valueOf(tagId)); |
| 77 | String parameter_json = jsonComponent.toJSONString(parameterMap); |
| 78 | |
| 79 | String ciphertext = AES.encrypt(parameter_json, secret, null); |
| 80 | |
| 81 | |
| 82 | return UriComponentsBuilder.fromUriString("videoRedirect") |
| 83 | .queryParam("jump", Base64.encodeBase64URL(ciphertext)) |
| 84 | .build().toString(); |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * 生成安全链接 |
no test coverage detected