当前位置:网站首页>Restfulapi - C - add header username and password authentication
Restfulapi - C - add header username and password authentication
2022-07-29 02:52:00 【LtMamba】
One 、 Verify part of the code
public bool securityFun()
{
bool resulT = false;
var headers = WebOperationContext.Current.IncomingRequest.Headers; // Get code snippet of request header
string userName = headers.Get("UserName");
string passWord = headers.Get("PassWord");
if (userName.Equals("test") && passWord.Equals("test"))
{
resulT = true;
}
return resulT;
}
边栏推荐
猜你喜欢

HTB-Blue

ECCV 2022 | airdet: a small sample target detection method without fine tuning

FFmpeg+SDL+QT实现简单是视频播放器

云开发打工人必备上班摸鱼划水微信小程序源码

第七天笔记

【报错】node:internal/modules/cjs/loader:936 【解决方法】

DataGrip 如何导出和恢复整个数据库数据,使用单个 SQL 文件

Introduction to network foundation

(job) C language: Simulation Implementation of ATOI and strncpy, strncat, strncmp

PHP幸运抽奖系统带后台源码
随机推荐
C language: hollow square pattern
第五天实验
Shell script quick start-01
xxxxx
PHP幸运抽奖系统带后台源码
向DataFrame中的特定位置添加一行
践踏---离散化+树状数组+差分
Asemi rectifier bridge s25vb100, s25vb100 parameters, s25vb100 application
qt QStringList用法
C language: Little Lele and hexadecimal conversion
Tesla neural network model hydranet
外挂---线段树懒标记板子+简单数学推理
6-21 vulnerability exploitation MySQL weak password cracking
ECCV 2022 | airdet: a small sample target detection method without fine tuning
Polygon zkEVM——Hermez 2.0简介
Driverless obstacle avoidance technology
Advanced architects, 16 common principles of microservice design and Governance
FTP protocol details
解析Steam教育中的项目式学习创造力
Stm32c8t6 encoder motor speed measurement and Arduino photoelectric module speed measurement