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

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

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

Request.setAuthType介绍

暂无

代码示例

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

  1. request.setAuthType(Constraint.__CERT_AUTH);
  2. request.setUserPrincipal(user);
  3. return user;

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

  1. request.setAuthType(Constraint.__BASIC_AUTH);
  2. request.setUserPrincipal(user);

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

  1. request.setAuthType(Constraint.__BASIC_AUTH);
  2. request.setUserPrincipal(user);

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

  1. else
  2. request.setAuthType(Constraint.__DIGEST_AUTH);
  3. request.setUserPrincipal(user);

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

  1. throw SecurityServiceException.newAccessDeniedException("User not in required role");
  2. request.setAuthType(AUTH_TYPE);
  3. request.setUserPrincipal(principal);

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

  1. else
  2. request.setAuthType(Constraint.__DIGEST_AUTH);
  3. 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/jetty-security

  1. base_request.setAuthType(Constraint.__BASIC_AUTH);
  2. base_request.setUserPrincipal(getPrincipal(user, getUserRealm()));

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

  1. base_request.setAuthType(Constraint.__BASIC_AUTH);
  2. base_request.setUserPrincipal(getPrincipal(user, getUserRealm()));

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

  1. request.setAuthType(Constraint.__FORM_AUTH);
  2. request.setUserPrincipal(form_cred._userPrincipal);
  3. session.setAttribute(__J_AUTHENTICATED,form_cred);
  4. request.setAuthType(Constraint.__FORM_AUTH);
  5. request.setUserPrincipal(form_cred._userPrincipal);
  6. return form_cred._userPrincipal;
  7. if(Log.isDebugEnabled())Log.debug("SSO for "+form_cred._userPrincipal);
  8. request.setAuthType(Constraint.__FORM_AUTH);
  9. session.setAttribute(__J_AUTHENTICATED,form_cred);
  10. return form_cred._userPrincipal;

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

  1. request.setAuthType(Constraint.__FORM_AUTH);
  2. request.setUserPrincipal(form_cred._userPrincipal);
  3. session.setAttribute(__J_AUTHENTICATED,form_cred);
  4. request.setAuthType(Constraint.__FORM_AUTH);
  5. request.setUserPrincipal(form_cred._userPrincipal);
  6. return form_cred._userPrincipal;
  7. if(Log.isDebugEnabled())Log.debug("SSO for "+form_cred._userPrincipal);
  8. request.setAuthType(Constraint.__FORM_AUTH);
  9. session.setAttribute(__J_AUTHENTICATED,form_cred);
  10. return form_cred._userPrincipal;

相关文章