use of org.eclipse.leshan.server.security.BootstrapSecurityStore in project leshan by eclipse.
the class LeshanBootstrapServerBuilderTest method create_server_with_securityStore.
@Test
public void create_server_with_securityStore() {
builder.setSecurityStore(new BootstrapSecurityStore() {
@Override
public SecurityInfo getByIdentity(String pskIdentity) {
return null;
}
@Override
public List<SecurityInfo> getAllByEndpoint(String endpoint) {
return null;
}
});
server = builder.build();
assertNotNull(server.getSecuredAddress());
assertNotNull(server.getUnsecuredAddress());
assertNotNull(server.getBootstrapSecurityStore());
}
use of org.eclipse.leshan.server.security.BootstrapSecurityStore in project leshan by eclipse.
the class LeshanBootstrapServerBuilderTest method create_server_with_securityStore_and_disable_secured_endpoint.
@Test
public void create_server_with_securityStore_and_disable_secured_endpoint() {
builder.setSecurityStore(new BootstrapSecurityStore() {
@Override
public SecurityInfo getByIdentity(String pskIdentity) {
return null;
}
@Override
public List<SecurityInfo> getAllByEndpoint(String endpoint) {
return null;
}
});
builder.disableSecuredEndpoint();
server = builder.build();
assertNull(server.getSecuredAddress());
assertNotNull(server.getUnsecuredAddress());
}
use of org.eclipse.leshan.server.security.BootstrapSecurityStore in project leshan by eclipse.
the class LeshanBootstrapServerBuilderTest method create_server_with_securityStore_and_disable_unsecured_endpoint.
@Test
public void create_server_with_securityStore_and_disable_unsecured_endpoint() {
builder.setSecurityStore(new BootstrapSecurityStore() {
@Override
public SecurityInfo getByIdentity(String pskIdentity) {
return null;
}
@Override
public List<SecurityInfo> getAllByEndpoint(String endpoint) {
return null;
}
});
builder.disableUnsecuredEndpoint();
server = builder.build();
assertNotNull(server.getSecuredAddress());
assertNull(server.getUnsecuredAddress());
}
Aggregations