Spring Security Java配置IS_AUTHENTICATED_FULLY

时间:2018-02-14 07:22:25

标签: java spring spring-security spring-saml

我需要将XML配置转换为java,我该怎么办呢

<security:http entry-point-ref="samlEntryPoint">
    <security:intercept-url pattern="/**"
        access="IS_AUTHENTICATED_FULLY" />
    <security:custom-filter before="FIRST"
        ref="metadataGeneratorFilter" />
    <security:custom-filter after="BASIC_AUTH_FILTER"
        ref="samlFilter" />
</security:http>

我尝试了这个但是我收到了一些错误

.anyRequest()访问( “IS_AUTHENTICATED_FULLY”);

无法评估表达式IS_AUTHENTICATED_FULLY

由于

1 个答案:

答案 0 :(得分:0)

使用 http.authorizeRequests().antMatchers("/**").fullyAuthenticated()