当前位置:网站首页>Ant desgin Open PDF to add Authentication Parameter Data
Ant desgin Open PDF to add Authentication Parameter Data
2022-07-18 03:51:00 【Tonysh Zds】
SignAuthInterceptor.java Ajout de l'authentification de signature pour accepter la demande de paramètre
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
log.info("request URI = " + request.getRequestURI());
HttpServletRequest requestWrapper = new BodyReaderHttpServletRequestWrapper(request);
//Obtenir tous les paramètres(Y compris:URLEtbodyOui.)
SortedMap<String, String> allParams = HttpUtils.getAllParams(requestWrapper);
//Vérification de la signature des paramètres
String headerSign = request.getHeader(CommonConstant.X_SIGN);
String timesTamp = request.getHeader(CommonConstant.X_TIMESTAMP);
if (oConvertUtils.isEmpty(headerSign)) {
headerSign = request.getParameter(CommonConstant.X_SIGN);
}
if (oConvertUtils.isEmpty(timesTamp)) {
timesTamp = request.getParameter(CommonConstant.X_TIMESTAMP);
}
...
view.js Ajouter accepter la demande de paramètres de premier plan
function webViewerInitialized() {
var queryString = document.location.search.substring(1);
var params = PDFViewerApplication.parseQueryString(queryString);
var file = 'file' in params ? params.file : DEFAULT_URL;
var token = 'token' in params ? params.token : '';
var timestamp = 'X-TIMESTAMP' in params ? params.X-TIMESTAMP : '';
var sign = 'X-Sign' in params ? params.X-Sign : '';
// console.log(token)
file += "?token="+token+"&X-TIMESTAMP="+timestamp+"&X-Sign="+sign
DasInfoVAttachmentLayout.vue Ouverture de la réception pdf Fichier Ajouter les paramètres d'authentification
getUrl(){
let timestamp = signMd5Utils.getDateTimeToString()
let url0 = `${this.url.downloadUrl}`
let sign = signMd5Utils.getSign(url0, '');
// Signez et horodatez , Ajouter à l'interface de demande URL
let _url = url0 +`/${this.id}&token=`+Vue.ls.get(ACCESS_TOKEN)+`&X-Sign=`+sign+`&X-TIMESTAMP=`+timestamp
let _urlPic = url0 +`/${this.id}?token=`+Vue.ls.get(ACCESS_TOKEN)+`&X-Sign=`+sign+`&X-TIMESTAMP=`+timestamp
let picType =[".jpg",".tif",".png"]
const hasPic = picType.filter(item => item == "."+this.filetype)
if(hasPic != ""){
return `${window._CONFIG['domianURL']}`+_urlPic
}
let url = `${window._CONFIG['domianURL']}/generic/web/viewer.html?file=${window._CONFIG['domianURL']}`+_url
return url
},
```
边栏推荐
- 51nod 1413 power binary
- Bitmap sign in
- ant-desgin 打开pdf增加认证参数据
- [Voforia] 通过识自己设定图片,显示特定AR模型
- Event preview | Apache Doris x Apache seatunnel joint meetup to start registration!
- 探索智能驾驶区间测速NTP时钟同步(PTP时间同步)
- Do you know the architecture and engine of MySQL?
- H5 implementation generates urlscheme and jumps from H5 to applet
- 四面阿里offer定级P8,2022最新最实用阿里68道高级面试题,助你们面试成功!!
- [C language] static & dynamic & file address book (over 10000 words)
猜你喜欢

Wrap in shutter

DEVKIT-mpc5744p配置rtos

朱松纯团队最新研究:机器人可与人类“推心置腹”!还说下一步要造“AI大白”...

Do you know the architecture and engine of MySQL?

Four sides Ali offer grading p82022 latest and most practical Ali 68 advanced interview questions to help you succeed in your interview!!

ArkUI常见问题汇总【系列1】

Bufferedinputstream byte cache input stream and cache stream efficiency test_ Copy files

Quickly deploy mqtt clusters on Alibaba cloud using terraform

AI简报-模型集成 SAM 和SWA

After 00, he graduated from Nanjing University and planned to be a special associate researcher. Netizens quarreled after picking out their papers
随机推荐
[Vuforia] 关于Vuforia插件(3D物体识别和地面识别)的一些测试记录
Unp learning notes - Chapter 2 transport layer
[C language] static & dynamic & file address book (over 10000 words)
UNP学习笔记-第三章套接字编程
MSP430 - timer (output comparison encoder speed measurement) (V)
Layout meta universe social networking, and the digital economy will usher in new opportunities for development
51nod 1278 separated circles
C # use tooltip control to realize bubble prompt
Serial port communication of esp32 (in the form of interruption and watchdog)
[200 opencv routines] 230 LBP statistical histogram of feature description
Leetcode brush questions
Efficient development of harmonyos course applications based on ETS
ArkUI常见问题汇总【系列1】
Redis连接池
Devkit mpc5744p configuring RTOS
JGG(IF 5.733)专刊征稿:人体微生物组
torch. Max () and numpy Discrimination of max () use
Talking about some features of improving work efficiency supported by slack channel
【OpenCV 例程200篇】230. 特征描述之 LBP 统计直方图
网站漏洞修复服务商讲解越权漏洞的原因