org.mortbay.jetty.Request.getUserPrincipal()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(278)

本文整理了Java中org.mortbay.jetty.Request.getUserPrincipal方法的一些代码示例,展示了Request.getUserPrincipal的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getUserPrincipal方法的具体详情如下:
包路径:org.mortbay.jetty.Request
类名称:Request
方法名:getUserPrincipal

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);

相关文章