Add primary annotation for redis beans in order to have priority in case of both redis and stateless configuration.
This commit is contained in:
parent
932c926f97
commit
5e6f01c9a1
|
@ -3,11 +3,13 @@ package eu.dnetlib.uoaauthorizationlibrary.authorization.redis;
|
|||
import eu.dnetlib.uoaauthorizationlibrary.authorization.configuration.Redis;
|
||||
import eu.dnetlib.uoaauthorizationlibrary.authorization.configuration.SecurityProperties;
|
||||
import eu.dnetlib.uoaauthorizationlibrary.authorization.security.CheckProperties;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@Primary
|
||||
public class RedisCheckProperties implements CheckProperties {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,11 +4,13 @@ import eu.dnetlib.uoaauthorizationlibrary.authorization.security.AuthorizationSe
|
|||
import eu.dnetlib.uoaauthorizationlibrary.authorization.security.EntryPoint;
|
||||
import eu.dnetlib.uoaauthorizationlibrary.authorization.security.SecurityMode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Primary
|
||||
public class RedisSecurityMode implements SecurityMode {
|
||||
|
||||
private final EntryPoint entryPoint;
|
||||
|
|
Loading…
Reference in New Issue