All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.yiuman.citrus.security.authorize.AuthorizeConfigProvider Maven / Gradle / Ivy

package com.github.yiuman.citrus.security.authorize;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
import org.springframework.stereotype.Component;

/**
 * Spring Security授权配置提供者
 *
 * @author yiuman
 * @date 2020/3/23
 */
@Component
public interface AuthorizeConfigProvider {

    /**
     * 在整个授权配置中,应该有且仅有一个针对anyRequest的配置,
     * 如果所有的实现都没有针对anyRequest的配置,系统会自动增加一个anyRequest().authenticated()的配置;
     * 如果有多个针对anyRequest的配置,则会抛出异常。
     *
     * @param config SpringSecurity中的HttpSecurity配置
     * @return 是否配置成功
     */
    boolean config(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry config);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy