当前位置:网站首页>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;
}
边栏推荐
猜你喜欢
随机推荐
golang 协程的实现原理
PHP幸运抽奖系统带后台源码
区区区间---线段树lazy标记板子题
[untitled]
Multiple inheritance and derived class member identification
QT compilation of IOT management platform 48 characteristic function design
.NET 序列化枚举为字符串
Summary of classic problems in Flink production environment
OSPF实验
Time for white horses to pass the gap
C language: judging letters
Flink内核源码(七)Flink SQL提交流程
第六天笔记
金山云回港上市:中国TO B云厂商的港股奔袭
vim常用命令
OSPF experiment
QT屏幕自适应自动布局,拖动窗口自动变大变小(一)
C语言:小乐乐与欧几里得
Wechat applet - Advanced chapter Lin UI component library source code analysis button component (II)
sqlilabs less-32~less-33








