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

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

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

Request.setUserPrincipal介绍

暂无

代码示例

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

  1. void authenticate(UserRealm realm,Request request)
  2. {
  3. _userPrincipal = realm.authenticate(_jUserName, _jPassword, request);
  4. if (_userPrincipal!=null)
  5. _realm=realm;
  6. else
  7. {
  8. Log.warn("AUTH FAILURE: user {}",StringUtil.printable(_jUserName));
  9. request.setUserPrincipal(null);
  10. }
  11. }

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

  1. void authenticate(UserRealm realm,Request request)
  2. {
  3. _userPrincipal = realm.authenticate(_jUserName, _jPassword, request);
  4. if (_userPrincipal!=null)
  5. _realm=realm;
  6. else
  7. {
  8. Log.warn("AUTH FAILURE: user {}",StringUtil.printable(_jUserName));
  9. request.setUserPrincipal(null);
  10. }
  11. }

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

  1. void authenticate(UserRealm realm,String user,String password,Request request)
  2. {
  3. _jUserName=user;
  4. _jPassword=password;
  5. _userPrincipal = realm.authenticate(user, password, request);
  6. if (_userPrincipal!=null)
  7. _realm=realm;
  8. else
  9. {
  10. Log.warn("AUTH FAILURE: user {}",StringUtil.printable(user));
  11. request.setUserPrincipal(null);
  12. }
  13. }

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

  1. void authenticate(UserRealm realm,String user,String password,Request request)
  2. {
  3. _jUserName=user;
  4. _jPassword=password;
  5. _userPrincipal = realm.authenticate(user, password, request);
  6. if (_userPrincipal!=null)
  7. _realm=realm;
  8. else
  9. {
  10. Log.warn("AUTH FAILURE: user {}",StringUtil.printable(user));
  11. request.setUserPrincipal(null);
  12. }
  13. }

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

  1. if (realm.reauthenticate(principal))
  2. request.setUserPrincipal(principal);
  3. return credential;

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

  1. request.setUserPrincipal(user);
  2. return user;

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

  1. if (realm.reauthenticate(principal))
  2. request.setUserPrincipal(principal);
  3. return credential;

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

  1. request.setUserPrincipal(user);

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

  1. request.setUserPrincipal(user);

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

  1. request.setUserPrincipal(user);

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

  1. request.setUserPrincipal(user);

代码示例来源:origin: org.graniteds/granite-server

  1. request.setUserPrincipal(principal);

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

  1. request.setUserPrincipal(UserRealm.NOT_CHECKED);
  2. return true;

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

  1. request.setUserPrincipal(_notChecked);
  2. return true;

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

  1. base_request.setUserPrincipal(user);
  2. base_request.setUserPrincipal(user);

代码示例来源:origin: org.graniteds/granite-server

  1. public Principal login(Object credentials, String charset) throws SecurityServiceException {
  2. String[] decoded = decodeBase64Credentials(credentials, charset);
  3. HttpGraniteContext graniteContext = (HttpGraniteContext)GraniteContext.getCurrentInstance();
  4. HttpServletRequest httpRequest = graniteContext.getRequest();
  5. Request request = httpRequest instanceof Request ? (Request)httpRequest : HttpConnection.getCurrentConnection().getRequest();
  6. UserRealm realm = request.getUserRealm();
  7. Principal principal = realm.authenticate(decoded[0], decoded[1], request);
  8. if (principal == null) {
  9. if (request.getSession(false) != null)
  10. request.getSession(false).removeAttribute(JETTY6_AUTH);
  11. throw SecurityServiceException.newInvalidCredentialsException("Wrong username or password");
  12. }
  13. request.setAuthType(AUTH_TYPE);
  14. request.setUserPrincipal(principal);
  15. request.getSession().setAttribute(JETTY6_AUTH, principal);
  16. endLogin(credentials, charset);
  17. return principal;
  18. }

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

  1. base_request.setUserPrincipal(getPrincipal(user, getUserRealm()));

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

  1. base_request.setUserPrincipal(getPrincipal(user, getUserRealm()));

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

  1. request.setUserPrincipal(form_cred._userPrincipal);
  2. session.setAttribute(__J_AUTHENTICATED,form_cred);
  3. request.setUserPrincipal(form_cred._userPrincipal);
  4. return form_cred._userPrincipal;

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

  1. request.setUserPrincipal(form_cred._userPrincipal);
  2. session.setAttribute(__J_AUTHENTICATED,form_cred);
  3. request.setUserPrincipal(form_cred._userPrincipal);
  4. return form_cred._userPrincipal;

相关文章