Fix packaging for shiro bundle
[aaa.git] / aaa-shiro-act / impl / src / main / java / org / opendaylight / aaa / AAAShiroProvider.java
1 /*
2  * Copyright © 2017 Inocybe Technologies 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 package org.opendaylight.aaa;
9
10 import org.opendaylight.aaa.shiro.ServiceProxy;
11 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory;
13
14 /**
15  * AAAShiroProvider provides enablement of the AAAFilter for RESTCONF.  odl-restconf-noauth
16  * demands AAA is turned off.  Since odl-restconf just installs AAA along with odl-restconf-noauth,
17  * AAAFilter is disabled by default.  The filter is only enabled upon activation of this bundle.
18  */
19 public class AAAShiroProvider {
20
21     private static final Logger LOG = LoggerFactory.getLogger(org.opendaylight.aaa.shiro.AAAShiroProvider.class);
22
23     /**
24      * Method called when the blueprint container is created.
25      */
26     @SuppressWarnings("unused") // called via blueprint
27     public void init() {
28         LOG.info("AAAShiroProvider Session Initiated");
29         ServiceProxy.getInstance().setEnabled(true);
30     }
31
32     /**
33      * Method called when the blueprint container is destroyed.
34      */
35     @SuppressWarnings("unused") // called via blueprint
36     public void close() {
37         LOG.info("AAAShiroProvider Closed");
38     }
39 }