本文整理了Java中org.mortbay.jetty.Request.setUserPrincipal
方法的一些代码示例,展示了Request.setUserPrincipal
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setUserPrincipal
方法的具体详情如下:
包路径:org.mortbay.jetty.Request
类名称:Request
方法名:setUserPrincipal
暂无
代码示例来源:origin: org.mortbay.jetty/jetty-security
void authenticate(UserRealm realm,Request request)
{
_userPrincipal = realm.authenticate(_jUserName, _jPassword, request);
if (_userPrincipal!=null)
_realm=realm;
else
{
Log.warn("AUTH FAILURE: user {}",StringUtil.printable(_jUserName));
request.setUserPrincipal(null);
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
void authenticate(UserRealm realm,Request request)
{
_userPrincipal = realm.authenticate(_jUserName, _jPassword, request);
if (_userPrincipal!=null)
_realm=realm;
else
{
Log.warn("AUTH FAILURE: user {}",StringUtil.printable(_jUserName));
request.setUserPrincipal(null);
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
void authenticate(UserRealm realm,String user,String password,Request request)
{
_jUserName=user;
_jPassword=password;
_userPrincipal = realm.authenticate(user, password, request);
if (_userPrincipal!=null)
_realm=realm;
else
{
Log.warn("AUTH FAILURE: user {}",StringUtil.printable(user));
request.setUserPrincipal(null);
}
}
代码示例来源:origin: org.mortbay.jetty/jetty-security
void authenticate(UserRealm realm,String user,String password,Request request)
{
_jUserName=user;
_jPassword=password;
_userPrincipal = realm.authenticate(user, password, request);
if (_userPrincipal!=null)
_realm=realm;
else
{
Log.warn("AUTH FAILURE: user {}",StringUtil.printable(user));
request.setUserPrincipal(null);
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
if (realm.reauthenticate(principal))
request.setUserPrincipal(principal);
return credential;
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
request.setUserPrincipal(user);
return user;
代码示例来源:origin: org.mortbay.jetty/jetty-security
if (realm.reauthenticate(principal))
request.setUserPrincipal(principal);
return credential;
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
request.setUserPrincipal(user);
代码示例来源:origin: org.mortbay.jetty/jetty-security
request.setUserPrincipal(user);
代码示例来源:origin: org.mortbay.jetty/jetty-security
request.setUserPrincipal(user);
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
request.setUserPrincipal(user);
代码示例来源:origin: org.graniteds/granite-server
request.setUserPrincipal(principal);
代码示例来源:origin: org.mortbay.jetty/jetty-security
request.setUserPrincipal(UserRealm.NOT_CHECKED);
return true;
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
request.setUserPrincipal(_notChecked);
return true;
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
base_request.setUserPrincipal(user);
base_request.setUserPrincipal(user);
代码示例来源:origin: org.graniteds/granite-server
public Principal login(Object credentials, String charset) throws SecurityServiceException {
String[] decoded = decodeBase64Credentials(credentials, charset);
HttpGraniteContext graniteContext = (HttpGraniteContext)GraniteContext.getCurrentInstance();
HttpServletRequest httpRequest = graniteContext.getRequest();
Request request = httpRequest instanceof Request ? (Request)httpRequest : HttpConnection.getCurrentConnection().getRequest();
UserRealm realm = request.getUserRealm();
Principal principal = realm.authenticate(decoded[0], decoded[1], request);
if (principal == null) {
if (request.getSession(false) != null)
request.getSession(false).removeAttribute(JETTY6_AUTH);
throw SecurityServiceException.newInvalidCredentialsException("Wrong username or password");
}
request.setAuthType(AUTH_TYPE);
request.setUserPrincipal(principal);
request.getSession().setAttribute(JETTY6_AUTH, principal);
endLogin(credentials, charset);
return principal;
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
base_request.setUserPrincipal(getPrincipal(user, getUserRealm()));
代码示例来源:origin: org.mortbay.jetty/jetty-security
base_request.setUserPrincipal(getPrincipal(user, getUserRealm()));
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
request.setUserPrincipal(form_cred._userPrincipal);
session.setAttribute(__J_AUTHENTICATED,form_cred);
request.setUserPrincipal(form_cred._userPrincipal);
return form_cred._userPrincipal;
代码示例来源:origin: org.mortbay.jetty/jetty-security
request.setUserPrincipal(form_cred._userPrincipal);
session.setAttribute(__J_AUTHENTICATED,form_cred);
request.setUserPrincipal(form_cred._userPrincipal);
return form_cred._userPrincipal;
内容来源于网络,如有侵权,请联系作者删除!