import org.iotivity.cloud.accountserver.resources.acl.id.AclResource;
import org.iotivity.cloud.accountserver.resources.acl.invite.InviteResource;
import org.iotivity.cloud.accountserver.resources.credprov.cert.CertificateResource;
+import org.iotivity.cloud.accountserver.resources.credprov.crl.CrlResource;
import org.iotivity.cloud.base.ServerSystem;
import org.iotivity.cloud.base.server.CoapServer;
import org.iotivity.cloud.util.Log;
serverSystem.addResource(new CertificateResource());
+ serverSystem.addResource(new CrlResource());
+
+ serverSystem.addResource(new AclResource());
+
serverSystem.addResource(new InviteResource());
- serverSystem.addServer(new CoapServer(new InetSocketAddress(Integer
- .parseInt(args[0]))));
+ serverSystem.addServer(new CoapServer(
+ new InetSocketAddress(Integer.parseInt(args[0]))));
boolean tlsMode = Integer.parseInt(args[1]) == 1;
import org.iotivity.cloud.ciserver.resources.proxy.account.AclGroup;
import org.iotivity.cloud.ciserver.resources.proxy.account.AclInvite;
import org.iotivity.cloud.ciserver.resources.proxy.account.Certificate;
+import org.iotivity.cloud.ciserver.resources.proxy.account.Crl;
import org.iotivity.cloud.ciserver.resources.proxy.mq.MessageQueue;
import org.iotivity.cloud.ciserver.resources.proxy.rd.DevicePresence;
import org.iotivity.cloud.ciserver.resources.proxy.rd.ResourceDirectory;
import org.iotivity.cloud.ciserver.resources.proxy.rd.ResourcePresence;
import org.iotivity.cloud.util.Log;
-/**
- *
- * This class is in charge of running of cloud interface server
- *
- */
-
public class CloudInterfaceServer {
public static void main(String[] args) throws Exception {
AclGroup aclGroupHandler = new AclGroup();
Certificate certHandler = new Certificate();
AclInvite aclInviteHandler = new AclInvite();
-
+ Crl crlHandler = new Crl();
CoapDevicePool devicePool = deviceServer.getDevicePool();
deviceServer.addResource(acHandler);
deviceServer.addResource(aclInviteHandler);
+ deviceServer.addResource(crlHandler);
+
KeepAliveResource resKeepAlive = new KeepAliveResource(
new int[] { 1, 2, 4, 8 });
--- /dev/null
+package org.iotivity.cloud.ciserver.resources.proxy.account;
+
+import java.util.Arrays;
+
+import org.iotivity.cloud.base.connector.ConnectorPool;
+import org.iotivity.cloud.base.device.Device;
+import org.iotivity.cloud.base.device.IRequestChannel;
+import org.iotivity.cloud.base.exception.ServerException;
+import org.iotivity.cloud.base.protocols.IRequest;
+import org.iotivity.cloud.base.resource.Resource;
+import org.iotivity.cloud.ciserver.Constants;
+
+public class Crl extends Resource {
+
+ private IRequestChannel mAuthServer = null;
+
+ public Crl() {
+ super(Arrays.asList(Constants.PREFIX_OIC,
+ Constants.CREDPROV_URI, Constants.REQ_CRL));
+
+ mAuthServer = ConnectorPool.getConnection("account");
+ }
+
+ @Override
+ public void onDefaultRequestReceived(Device srcDevice, IRequest request)
+ throws ServerException {
+ // Token exchange is done by CoapClient
+ mAuthServer.sendRequest(request, srcDevice);
+ }
+}
\ No newline at end of file