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

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

本文整理了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

  1. public String getRemoteUser()
  2. {
  3. Principal p = getUserPrincipal();
  4. if (p==null)
  5. return null;
  6. return p.getName();
  7. }

代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server

  1. public boolean isUserInRole(String role)
  2. {
  3. if (_roleMap!=null)
  4. {
  5. String r=(String)_roleMap.get(role);
  6. if (r!=null)
  7. role=r;
  8. }
  9. Principal principal = getUserPrincipal();
  10. if (_userRealm!=null && principal!=null)
  11. return _userRealm.isUserInRole(principal, role);
  12. return false;
  13. }

代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server

  1. user=_realm.pushRole(base_request.getUserPrincipal(),_runAs);
  2. base_request.setUserPrincipal(user);

代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server

  1. _userRealm.disassociate(base_request.getUserPrincipal());

代码示例来源:origin: org.mortbay.jetty/jetty-security

  1. _userRealm.disassociate(base_request.getUserPrincipal());

代码示例来源:origin: org.mortbay.jetty/jetty-security

  1. if (request.getUserPrincipal()!=null)
  2. form_cred._userPrincipal=request.getUserPrincipal();
  3. form_cred._jUserName=form_cred._userPrincipal.getName();
  4. if (cred!=null)

代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server

  1. if (request.getUserPrincipal()!=null)
  2. form_cred._userPrincipal=request.getUserPrincipal();
  3. form_cred._jUserName=form_cred._userPrincipal.getName();
  4. if (cred!=null)

代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server

  1. user= request.getUserPrincipal();
  2. if (user == null)
  3. user= realm.authenticate(request.getRemoteUser(), null, request);

代码示例来源:origin: org.mortbay.jetty/jetty-security

  1. user= request.getUserPrincipal();
  2. if (user == null)
  3. user= realm.authenticate(request.getRemoteUser(), null, request);

相关文章