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

ru.vyukov.anotherliverefresh.autoconfigure.AnotherLiveRefreshSpringSecurityAutoConfiguration Maven / Gradle / Ivy

package ru.vyukov.anotherliverefresh.autoconfigure;

import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurer;
import org.springframework.security.config.annotation.web.builders.WebSecurity;

import lombok.extern.slf4j.Slf4j;
import ru.vyukov.anotherliverefresh.ws.LiveRefreshConnectionHandler;

@Configuration
@ConditionalOnClass(WebSecurityConfigurer.class)
@ConditionalOnBean(LiveRefreshConnectionHandler.class)
@Slf4j
public class AnotherLiveRefreshSpringSecurityAutoConfiguration implements WebSecurityConfigurer {

	@Override
	public void init(WebSecurity builder) throws Exception {
		;//
	}

	@Override
	public void configure(WebSecurity builder) throws Exception {
		log.debug("/refresh.js add ignore spring security");
		builder.ignoring().antMatchers("/alr/refresh.js", "/alr/help.html", "/alr/refresh");
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy