001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019package org.apache.shiro.spring.config;
020
021import org.apache.shiro.authc.Authenticator;
022import org.apache.shiro.authc.pam.AuthenticationStrategy;
023import org.apache.shiro.authz.Authorizer;
024import org.apache.shiro.event.EventBus;
025import org.apache.shiro.mgt.*;
026import org.apache.shiro.realm.Realm;
027import org.apache.shiro.session.mgt.SessionFactory;
028import org.apache.shiro.session.mgt.SessionManager;
029import org.apache.shiro.session.mgt.eis.SessionDAO;
030import org.springframework.context.annotation.Bean;
031import org.springframework.context.annotation.Configuration;
032import org.springframework.context.annotation.Import;
033
034import java.util.List;
035
036/**
037 * @since 1.4.0
038 */
039@Configuration
040@Import({ShiroBeanConfiguration.class})
041public class ShiroConfiguration extends AbstractShiroConfiguration {
042
043
044    @Bean
045    @Override
046    protected SessionsSecurityManager securityManager(List<Realm> realms) {
047        return super.securityManager(realms);
048    }
049
050    @Bean
051    @Override
052    protected SessionManager sessionManager() {
053        return super.sessionManager();
054    }
055
056    @Bean
057    @Override
058    protected SubjectDAO subjectDAO() {
059        return super.subjectDAO();
060    }
061
062    @Bean
063    @Override
064    protected SessionStorageEvaluator sessionStorageEvaluator() {
065        return super.sessionStorageEvaluator();
066    }
067
068    @Bean
069    @Override
070    protected SubjectFactory subjectFactory() {
071        return super.subjectFactory();
072    }
073
074    @Bean
075    @Override
076    protected SessionFactory sessionFactory() {
077        return super.sessionFactory();
078    }
079
080    @Bean
081    @Override
082    protected SessionDAO sessionDAO() {
083        return super.sessionDAO();
084    }
085
086    @Bean
087    @Override
088    protected Authorizer authorizer() {
089        return super.authorizer();
090    }
091
092    @Bean
093    @Override
094    protected AuthenticationStrategy authenticationStrategy() {
095        return super.authenticationStrategy();
096    }
097
098    @Bean
099    @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}