开发者

How to get user info on the server side of a website which is using kerberos?

The ke开发者_C百科rberos provide authentication control, but I still need to have some user-wise control so I want to get more user information(eg. uid). Thanks.


It's available by HttpServletRequest#getRemoteUser().

So, in a servlet it would look like:

String name = request.getRemoteUser();
// ...

In a JSP it would look like:

<p>Welcome, ${pageContext.request.remoteUser}</p>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜