本文整理了Java中org.eclipse.jetty.server.Request.getUserIdentityScope
方法的一些代码示例,展示了Request.getUserIdentityScope
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getUserIdentityScope
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称:Request
方法名:getUserIdentityScope
暂无
代码示例来源:origin: org.graniteds/granite-server
@Override
public void prelogin(HttpSession session, Object httpRequest, String servletName) {
if (session == null) // Cannot prelogin() without a session
return;
if (session.getAttribute(AuthenticationContext.class.getName()) instanceof Jetty8AuthenticationContext)
return;
Request request = (Request)httpRequest;
Authentication authentication = request.getAuthentication();
UserIdentity.Scope scope = request.getUserIdentityScope();
Jetty8AuthenticationContext authorizationContext = new Jetty8AuthenticationContext(scope, authentication);
session.setAttribute(AuthenticationContext.class.getName(), authorizationContext);
}
代码示例来源:origin: org.graniteds/granite-server
request = (Request)httpRequest;
Authentication authentication = request.getAuthentication();
UserIdentity.Scope scope = request.getUserIdentityScope();
代码示例来源:origin: org.graniteds/granite-server
public Principal login(Object credentials, String charset) throws SecurityServiceException {
String[] decoded = decodeBase64Credentials(credentials, charset);
ServletGraniteContext graniteContext = (ServletGraniteContext)GraniteContext.getCurrentInstance();
Principal principal = null;
if (graniteContext instanceof HttpGraniteContext) {
HttpServletRequest httpRequest = graniteContext.getRequest();
Request request = (Request)httpRequest;
Authentication authentication = request.getAuthentication();
UserIdentity.Scope scope = request.getUserIdentityScope();
Jetty8AuthenticationContext authenticationContext = new Jetty8AuthenticationContext(scope, authentication);
principal = authenticationContext.authenticate(decoded[0], decoded[1]);
if (principal != null)
graniteContext.getSession().setAttribute(AuthenticationContext.class.getName(), authenticationContext);
}
else {
AuthenticationContext authenticationContext = (AuthenticationContext)graniteContext.getSession().getAttribute(AuthenticationContext.class.getName());
if (authenticationContext != null)
principal = authenticationContext.authenticate(decoded[0], decoded[1]);
else
return null;
}
if (principal == null)
throw SecurityServiceException.newInvalidCredentialsException("Wrong username or password");
graniteContext.setPrincipal(principal);
endLogin(credentials, charset);
return principal;
}
代码示例来源:origin: org.graniteds/granite-server
public Principal login(Object credentials, String charset) throws SecurityServiceException {
String[] decoded = decodeBase64Credentials(credentials, charset);
ServletGraniteContext graniteContext = (ServletGraniteContext)GraniteContext.getCurrentInstance();
Principal principal = null;
if (graniteContext instanceof HttpGraniteContext) {
HttpServletRequest httpRequest = graniteContext.getRequest();
Request request = (Request)httpRequest;
Authentication authentication = request.getAuthentication();
UserIdentity.Scope scope = request.getUserIdentityScope();
Jetty9AuthenticationContext authenticationContext = new Jetty9AuthenticationContext(scope, authentication);
principal = authenticationContext.authenticate(decoded[0], decoded[1]);
if (principal != null)
graniteContext.getSession().setAttribute(AuthenticationContext.class.getName(), authenticationContext);
}
else {
AuthenticationContext authenticationContext = (AuthenticationContext)graniteContext.getSession().getAttribute(AuthenticationContext.class.getName());
if (authenticationContext != null)
principal = authenticationContext.authenticate(decoded[0], decoded[1]);
else
return null;
}
if (principal == null)
throw SecurityServiceException.newInvalidCredentialsException("Wrong username or password");
graniteContext.setPrincipal(principal);
endLogin(credentials, charset);
return principal;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
ServletHolder servlet_holder=(ServletHolder) baseRequest.getUserIdentityScope();
FilterChain chain=null;
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
ServletHolder servlet_holder=(ServletHolder) baseRequest.getUserIdentityScope();
FilterChain chain=null;
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
ServletHolder servlet_holder=(ServletHolder) baseRequest.getUserIdentityScope();
FilterChain chain=null;
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
ServletHolder servlet_holder=(ServletHolder) baseRequest.getUserIdentityScope();
FilterChain chain=null;
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
ServletHolder servlet_holder=(ServletHolder) baseRequest.getUserIdentityScope();
FilterChain chain=null;
代码示例来源:origin: Nextdoor/bender
ServletHolder servlet_holder=(ServletHolder) baseRequest.getUserIdentityScope();
FilterChain chain=null;
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.servlet
ServletHolder servlet_holder=(ServletHolder) baseRequest.getUserIdentityScope();
FilterChain chain=null;
代码示例来源:origin: jenkinsci/winstone
throws IOException, ServletException
ServletHolder servlet_holder=(ServletHolder) baseRequest.getUserIdentityScope();
FilterChain chain=null;
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
old_scope=baseRequest.getUserIdentityScope();
baseRequest.setUserIdentityScope(servlet_holder);
代码示例来源:origin: Nextdoor/bender
old_scope=baseRequest.getUserIdentityScope();
baseRequest.setUserIdentityScope(servlet_holder);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
old_scope=baseRequest.getUserIdentityScope();
baseRequest.setUserIdentityScope(servlet_holder);
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.servlet
old_scope=baseRequest.getUserIdentityScope();
baseRequest.setUserIdentityScope(servlet_holder);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
old_scope=baseRequest.getUserIdentityScope();
baseRequest.setUserIdentityScope(servlet_holder);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
old_scope=baseRequest.getUserIdentityScope();
baseRequest.setUserIdentityScope(servlet_holder);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
old_scope=baseRequest.getUserIdentityScope();
baseRequest.setUserIdentityScope(servlet_holder);
代码示例来源:origin: jenkinsci/winstone
old_scope=baseRequest.getUserIdentityScope();
baseRequest.setUserIdentityScope(servlet_holder);
内容来源于网络,如有侵权,请联系作者删除!