You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Brian Demers (JIRA)" <ji...@apache.org> on 2017/03/22 17:33:42 UTC

[jira] [Commented] (SHIRO-618) Spring Boot Web Starter- Autoconfiguration for Realm and ShiroFilterChainDefinition

    [ https://issues.apache.org/jira/browse/SHIRO-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15936753#comment-15936753 ] 

Brian Demers commented on SHIRO-618:
------------------------------------

Hey Marc,

I left out the `ShiroFilterChainDefinition` just because that was previously _required_, but I do think we should just protect `/**` by default, if you want to send that as a PR, that would be great! Other thoughts appreciated here.

As for a default `Realm`, I have mixed feelings about.  When configuring Shiro with a `shiro.ini` file, a realm is automatically added if the `[users]` section is defined.  In this environment we do not have a `shiro.ini` file to inspect.  We could probably define a Realm that throws /logs an exception explaining how to define a realm.  Ideas?

> Spring Boot Web Starter- Autoconfiguration for Realm and ShiroFilterChainDefinition
> -----------------------------------------------------------------------------------
>
>                 Key: SHIRO-618
>                 URL: https://issues.apache.org/jira/browse/SHIRO-618
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Marc G.
>
> After adding the spring-boot-web-starter you got the exception that two beans are missing.
> * Realm
> * ShiroFilterChainDefinition
> Are they not defined on purpose? Both can be provided as a default with @ConditionalOnMissingBean.
> A default TextConfigurationRealm could be configured with properties.
> Providing defaults makes it easier to get startet. 
> I could provide a pull request if desired.
> What do you think?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)