Package com.tll.server

Examples of com.tll.server.SecurityContext


  private org.springframework.security.intercept.web.FilterSecurityInterceptor wrapped;

  @Override
  public void init(FilterConfig config) throws ServletException {
    log.debug("Initializing the FilterSecurityInterceptor..");
    final SecurityContext sc = getSecurityContext(config);
    wrapped.setAuthenticationManager(sc.getAuthenticationManager());
    wrapped.setAccessDecisionManager(sc.getHttpRequestAccessDecisionManager());

    final String ods = config.getInitParameter("objectDefinitionSource");
    if(ods == null) {
      throw new Error("The init parameter 'objectDefinitionSource' must be declared");
    }
View Full Code Here


      AuthenticationException failed) throws IOException;

  @Override
  public void init(FilterConfig config) throws ServletException {
    log.debug("Initializing the AuthenticationProcessingFilter..");
    final SecurityContext sc = getSecurityContext(config);
    wrapped.setAuthenticationManager(sc.getAuthenticationManager());

    final String afu = config.getInitParameter("authenticationFailureUrl");
    if(afu == null) {
      throw new Error("The init parameter 'authenticationFailureUrl' must be declared");
    }
View Full Code Here

   * @throws ServletException When the security context can't be obtained.
   */
  protected final SecurityContext getSecurityContext(ServletRequest request) throws ServletException {
    assert request != null;
    final HttpSession session = ((HttpServletRequest) request).getSession(false);
    final SecurityContext sc =
        session == null ? null : (SecurityContext) session.getServletContext().getAttribute(
            SecurityContext.KEY);
    if(sc == null) {
      throw new ServletException("Unable to obtain the security context from the request");
    }
View Full Code Here

   * @return The non-<code>null</code> security context.
   * @throws ServletException When the security context can't be obtained.
   */
  protected final SecurityContext getSecurityContext(FilterConfig config) throws ServletException {
    assert config != null;
    final SecurityContext sc =
        (SecurityContext) config.getServletContext().getAttribute(SecurityContext.KEY);
    if(sc == null) {
      throw new ServletException("Unable to obtain the security context from the filter configuration.");
    }
    return sc;
View Full Code Here

TOP

Related Classes of com.tll.server.SecurityContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.