|
|
@ -17,19 +17,14 @@ package org.thingsboard.server.transport.lwm2m.server.store; |
|
|
|
|
|
|
|
|
import org.eclipse.leshan.server.californium.registration.CaliforniumRegistrationStore; |
|
|
import org.eclipse.leshan.server.californium.registration.CaliforniumRegistrationStore; |
|
|
import org.eclipse.leshan.server.californium.registration.InMemoryRegistrationStore; |
|
|
import org.eclipse.leshan.server.californium.registration.InMemoryRegistrationStore; |
|
|
import org.eclipse.leshan.server.security.EditableSecurityStore; |
|
|
|
|
|
import org.eclipse.leshan.server.security.InMemorySecurityStore; |
|
|
|
|
|
import org.eclipse.leshan.server.security.SecurityStore; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.context.annotation.Bean; |
|
|
import org.springframework.context.annotation.Bean; |
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.thingsboard.server.cache.TBRedisCacheConfiguration; |
|
|
import org.thingsboard.server.cache.TBRedisCacheConfiguration; |
|
|
import org.thingsboard.server.queue.util.TbLwM2mTransportComponent; |
|
|
import org.thingsboard.server.queue.util.TbLwM2mTransportComponent; |
|
|
import org.thingsboard.server.transport.lwm2m.config.LwM2MTransportServerConfig; |
|
|
import org.thingsboard.server.transport.lwm2m.config.LwM2MTransportServerConfig; |
|
|
import org.thingsboard.server.transport.lwm2m.secure.LwM2mCredentialsSecurityInfoValidator; |
|
|
import org.thingsboard.server.transport.lwm2m.secure.LwM2mCredentialsSecurityInfoValidator; |
|
|
import org.thingsboard.server.transport.lwm2m.server.client.LwM2mClientContext; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Optional; |
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
|
@ -56,7 +51,7 @@ public class TbLwM2mStoreFactory { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Bean |
|
|
@Bean |
|
|
private TbSecurityStore securityStore() { |
|
|
private TbEditableSecurityStore securityStore() { |
|
|
return new TbLwM2mSecurityStore(redisConfiguration.isPresent() && useRedis ? |
|
|
return new TbLwM2mSecurityStore(redisConfiguration.isPresent() && useRedis ? |
|
|
new TbLwM2mRedisSecurityStore(redisConfiguration.get().redisConnectionFactory()) : new TbInMemorySecurityStore(), validator); |
|
|
new TbLwM2mRedisSecurityStore(redisConfiguration.get().redisConnectionFactory()) : new TbInMemorySecurityStore(), validator); |
|
|
} |
|
|
} |
|
|
|