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.mgt.RememberMeManager; 025import org.apache.shiro.mgt.SessionStorageEvaluator; 026import org.apache.shiro.mgt.SessionsSecurityManager; 027import org.apache.shiro.mgt.SubjectDAO; 028import org.apache.shiro.mgt.SubjectFactory; 029import org.apache.shiro.realm.Realm; 030import org.apache.shiro.session.mgt.SessionFactory; 031import org.apache.shiro.session.mgt.SessionManager; 032import org.apache.shiro.session.mgt.eis.SessionDAO; 033import org.springframework.context.annotation.Bean; 034import org.springframework.context.annotation.Configuration; 035import org.springframework.context.annotation.Import; 036 037import java.util.List; 038 039/** 040 * @since 1.4.0 041 */ 042@Configuration 043@Import({ShiroBeanConfiguration.class}) 044public class ShiroConfiguration extends AbstractShiroConfiguration { 045 046 047 @Bean 048 @Override 049 protected SessionsSecurityManager securityManager(List<Realm> realms) { 050 return super.securityManager(realms); 051 } 052 053 @Bean 054 @Override 055 protected SessionManager sessionManager() { 056 return super.sessionManager(); 057 } 058 059 @Bean 060 @Override 061 protected SubjectDAO subjectDAO() { 062 return super.subjectDAO(); 063 } 064 065 @Bean 066 @Override 067 protected SessionStorageEvaluator sessionStorageEvaluator() { 068 return super.sessionStorageEvaluator(); 069 } 070 071 @Bean 072 @Override 073 protected SubjectFactory subjectFactory() { 074 return super.subjectFactory(); 075 } 076 077 @Bean 078 @Override 079 protected SessionFactory sessionFactory() { 080 return super.sessionFactory(); 081 } 082 083 @Bean 084 @Override 085 protected SessionDAO sessionDAO() { 086 return super.sessionDAO(); 087 } 088 089 @Bean 090 @Override 091 protected Authorizer authorizer() { 092 return super.authorizer(); 093 } 094 095 @Bean 096 @Override 097 protected AuthenticationStrategy authenticationStrategy() { 098 return super.authenticationStrategy(); 099 } 100 101 @Bean 102 @Override 103 protected Authenticator authenticator() { 104 return super.authenticator(); 105 } 106 107 @Bean 108 @Override 109 protected RememberMeManager rememberMeManager() { 110 return super.rememberMeManager(); 111 } 112}