本文整理了Java中org.mortbay.jetty.Request.getUserPrincipal
方法的一些代码示例,展示了Request.getUserPrincipal
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getUserPrincipal
方法的具体详情如下:
包路径:org.mortbay.jetty.Request
类名称:Request
方法名:getUserPrincipal
暂无
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public String getRemoteUser()
{
Principal p = getUserPrincipal();
if (p==null)
return null;
return p.getName();
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public boolean isUserInRole(String role)
{
if (_roleMap!=null)
{
String r=(String)_roleMap.get(role);
if (r!=null)
role=r;
}
Principal principal = getUserPrincipal();
if (_userRealm!=null && principal!=null)
return _userRealm.isUserInRole(principal, role);
return false;
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
user=_realm.pushRole(base_request.getUserPrincipal(),_runAs);
base_request.setUserPrincipal(user);
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
_userRealm.disassociate(base_request.getUserPrincipal());
代码示例来源:origin: org.mortbay.jetty/jetty-security
_userRealm.disassociate(base_request.getUserPrincipal());
代码示例来源:origin: org.mortbay.jetty/jetty-security
if (request.getUserPrincipal()!=null)
form_cred._userPrincipal=request.getUserPrincipal();
form_cred._jUserName=form_cred._userPrincipal.getName();
if (cred!=null)
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
if (request.getUserPrincipal()!=null)
form_cred._userPrincipal=request.getUserPrincipal();
form_cred._jUserName=form_cred._userPrincipal.getName();
if (cred!=null)
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
user= request.getUserPrincipal();
if (user == null)
user= realm.authenticate(request.getRemoteUser(), null, request);
代码示例来源:origin: org.mortbay.jetty/jetty-security
user= request.getUserPrincipal();
if (user == null)
user= realm.authenticate(request.getRemoteUser(), null, request);
内容来源于网络,如有侵权,请联系作者删除!