Java 检查客户端';s的身份验证状态(web服务)
大家好 比如说,我有一个web服务器和一个客户机,它第一次连接到它。身份验证机制是:Java 检查客户端';s的身份验证状态(web服务),java,web-services,Java,Web Services,大家好 比如说,我有一个web服务器和一个客户机,它第一次连接到它。身份验证机制是: 1) parse the client's UsernameToken element and retrieve its username, password and nonce. 2) evaluate a hash: SHA2 (username + password + nonce) 3) check if a Data Base contains such a hash. 让我们假设有这
1) parse the client's UsernameToken element and retrieve its username, password and
nonce.
2) evaluate a hash: SHA2 (username + password + nonce)
3) check if a Data Base contains such a hash.
让我们假设有这样一个散列。问题是,当客户端第二次连接时,如何知道它已经通过身份验证
- 搜索数据库是相当昂贵的,所以我不能在每次连接时都这样做
- 在内存中保存客户端散列将提高性能,但它应该在这样的注册表中存在多长时间,这似乎是一个巨大的安全漏洞
- 会话参数?但是如何在web服务上下文中实现它呢