Drop explicit jetty-servlets dependency
[aaa.git] / aaa-shiro / impl / src / main / java / org / opendaylight / aaa / shiro / filters / AAAShiroFilter.java
1 /*
2  * Copyright (c) 2016 - 2017 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.aaa.shiro.filters;
10
11 import org.apache.shiro.web.servlet.ShiroFilter;
12 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory;
14
15 /**
16  * The default AAA JAX-RS 1.X Web Filter.  Unlike AAAFilter, which is aimed towards
17  * supporting RESTCONF and its existing API mechanisms, AAAShiroFilter is a generic
18  * <code>ShiroFilter</code> for use with any other ODL Servlets.  The main difference
19  * is that <code>AAAFilter</code> was designed to support the existing noauth
20  * mechanism, while this filter cannot be disabled.
21  *
22  * This class is also responsible for delivering debug information; to enable these
23  * debug statements, please issue the following in the karaf shell:
24  *
25  * <code>log:set DEBUG AAAShiroFilter</code>
26  *
27  * @see <code>javax.servlet.Filter</code>
28  * @see <code>org.apache.shiro.web.servlet.ShiroFilter</code>
29  */
30 public class AAAShiroFilter extends ShiroFilter {
31
32     private static final Logger LOG = LoggerFactory.getLogger(AAAShiroFilter.class);
33
34     public AAAShiroFilter() {
35         LOG.debug("Creating the AAAShiroFilter");
36     }
37
38     /*
39      * (non-Javadoc)
40      *
41      * Adds context clues that aid in debugging.
42      *
43      * @see org.apache.shiro.web.servlet.ShiroFilter#init()
44      */
45     @Override
46     public void init() throws Exception {
47         super.init();
48         LOG.debug("Initializing the AAAShiroFilter");
49     }
50 }