当前位置:网站首页>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;
}
边栏推荐
- C语言:空心正方形图案
- 图书管理系统
- (作业)C语言:atoi和strncpy、strncat、strncmp的模拟实现
- Catchadmin practical tutorial (IV) implementation of relevant functions of table components
- OWT server source code analysis (4) -- video module analysis of mixer out
- 并发模式之单例和不变模式
- 12. Writing rules - static mode
- Summary of classic problems in Flink production environment
- 【无标题】
- 【luogu P8352】小 N 的独立集(DP套DP)(性质)
猜你喜欢

Etcd implementation of large-scale service governance application practice

Thirty years of MPEG audio coding

第八天笔记

QT screen adaptive automatic layout, drag the window to automatically grow larger and smaller (I)

New UI Sifang aggregate payment system source code / new usdt withdrawal / latest update security upgrade to fix XSS vulnerability patch vulnerability

DHCP协议详细解析

多重继承与派生类成员标识

家庭亲戚关系计算器微信小程序源码

第五天实验

云开发打工人必备上班摸鱼划水微信小程序源码
随机推荐
ASEMI整流桥S25VB100,S25VB100参数,S25VB100应用
PHP幸运抽奖系统带后台源码
Some new ideas about time complexity
多线程实现多用例文件并发读取执行+Selenium Grid4实现测试框架分布式部署
Ffmpeg+sdl+qt is a simple video player
第十天笔记
C language: Little Lele and hexadecimal conversion
Notes on the seventh day
Some records during the development of ros2/ros1
Self organization is the two-way rush of managers and members
Ordinary happiness
PHP process communication series (I) named pipes
Notes on the sixth day
STP协议(生成树协议)
多重继承与派生类成员标识
图书管理系统
Pgzero飞机大战
owt-server源码剖析(四)--video模块分析之Mixer Out
用于校园流浪猫信息记录和分享的小程序源码/微信云开发中大猫谱小程序源码
Library management system