2 * Copyright (c) 2016 - 2017 Brocade Communications Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.aaa.shiro.filters;
11 import javax.servlet.Filter;
12 import org.apache.shiro.web.servlet.ShiroFilter;
13 import org.osgi.service.component.annotations.Component;
14 import org.osgi.service.component.annotations.ServiceScope;
15 import org.osgi.service.http.whiteboard.propertytypes.HttpWhiteboardFilterAsyncSupported;
16 import org.osgi.service.http.whiteboard.propertytypes.HttpWhiteboardFilterName;
17 import org.osgi.service.http.whiteboard.propertytypes.HttpWhiteboardFilterPattern;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
22 * The default AAA JAX-RS 1.X Web Filter. Unlike AAAFilter, which is aimed towards
23 * supporting RESTCONF and its existing API mechanisms, AAAShiroFilter is a generic
24 * <code>ShiroFilter</code> for use with any other ODL Servlets. The main difference
25 * is that <code>AAAFilter</code> was designed to support the existing noauth
26 * mechanism, while this filter cannot be disabled.
29 * This class is also responsible for delivering debug information; to enable these
30 * debug statements, please issue the following in the karaf shell:
32 * <code>log:set DEBUG AAAShiroFilter</code>
34 * @see javax.servlet.Filter
38 @HttpWhiteboardFilterAsyncSupported
39 @HttpWhiteboardFilterPattern("/*")
40 @HttpWhiteboardFilterName("AAAShiroFilter")
41 @Component(service = Filter.class, scope = ServiceScope.PROTOTYPE)
42 public final class AAAShiroFilter extends ShiroFilter {
43 private static final Logger LOG = LoggerFactory.getLogger(AAAShiroFilter.class);
45 public AAAShiroFilter() {
46 LOG.debug("Creating the AAAShiroFilter");
52 * Adds context clues that aid in debugging.
54 * @see ShiroFilter#init()
57 public void init() throws Exception {
59 LOG.debug("AAAShiroFilter initialized");