View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.shiro.spring.config;
20  
21  import org.apache.shiro.authc.Authenticator;
22  import org.apache.shiro.authc.pam.AuthenticationStrategy;
23  import org.apache.shiro.authz.Authorizer;
24  import org.apache.shiro.event.EventBus;
25  import org.apache.shiro.mgt.*;
26  import org.apache.shiro.realm.Realm;
27  import org.apache.shiro.session.mgt.SessionFactory;
28  import org.apache.shiro.session.mgt.SessionManager;
29  import org.apache.shiro.session.mgt.eis.SessionDAO;
30  import org.springframework.context.annotation.Bean;
31  import org.springframework.context.annotation.Configuration;
32  import org.springframework.context.annotation.Import;
33  
34  import java.util.List;
35  
36  /**
37   * @since 1.4.0
38   */
39  @Configuration
40  @Import({ShiroBeanConfiguration.class})
41  public class ShiroConfiguration extends AbstractShiroConfiguration {
42  
43  
44      @Bean
45      @Override
46      protected SessionsSecurityManager securityManager(List<Realm> realms) {
47          return super.securityManager(realms);
48      }
49  
50      @Bean
51      @Override
52      protected SessionManager sessionManager() {
53          return super.sessionManager();
54      }
55  
56      @Bean
57      @Override
58      protected SubjectDAO subjectDAO() {
59          return super.subjectDAO();
60      }
61  
62      @Bean
63      @Override
64      protected SessionStorageEvaluator sessionStorageEvaluator() {
65          return super.sessionStorageEvaluator();
66      }
67  
68      @Bean
69      @Override
70      protected SubjectFactory subjectFactory() {
71          return super.subjectFactory();
72      }
73  
74      @Bean
75      @Override
76      protected SessionFactory sessionFactory() {
77          return super.sessionFactory();
78      }
79  
80      @Bean
81      @Override
82      protected SessionDAO sessionDAO() {
83          return super.sessionDAO();
84      }
85  
86      @Bean
87      @Override
88      protected Authorizer authorizer() {
89          return super.authorizer();
90      }
91  
92      @Bean
93      @Override
94      protected AuthenticationStrategy authenticationStrategy() {
95          return super.authenticationStrategy();
96      }
97  
98      @Bean
99      @Override
100     protected Authenticator authenticator() {
101         return super.authenticator();
102     }
103 
104     @Bean
105     @Override
106     protected RememberMeManager rememberMeManager() {
107         return super.rememberMeManager();
108     }
109 }