RemoteStoreProvider.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.utils.certificate.remote;

  21. import java.io.ByteArrayOutputStream;
  22. import java.security.PublicKey;

  23. import org.openspcoop2.utils.UtilsException;
  24. import org.openspcoop2.utils.certificate.Certificate;
  25. import org.openspcoop2.utils.certificate.JWK;

  26. /**
  27.  * RemoteStoreProvider
  28.  *
  29.  * @author Poli Andrea (apoli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public class RemoteStoreProvider implements IRemoteStoreProvider {

  34.     @Override
  35.     public JWK readJWK(String keyId, RemoteStoreConfig remoteConfig) throws UtilsException {
  36.         return RemoteStoreUtils.readJWK(keyId, remoteConfig);
  37.     }
  38.     @Override
  39.     public JWK readJWK(String keyId, RemoteStoreConfig remoteConfig, ByteArrayOutputStream bout) throws UtilsException{
  40.         return RemoteStoreUtils.readJWK(keyId, remoteConfig, bout);
  41.     }

  42.     @Override
  43.     public Certificate readX509(String keyId, RemoteStoreConfig remoteConfig) throws UtilsException {
  44.         return RemoteStoreUtils.readX509(keyId, remoteConfig);
  45.     }
  46.     @Override
  47.     public Certificate readX509(String keyId, RemoteStoreConfig remoteConfig, ByteArrayOutputStream bout) throws UtilsException{
  48.         return RemoteStoreUtils.readX509(keyId, remoteConfig, bout);
  49.     }

  50.     @Override
  51.     public PublicKey readPublicKey(String keyId, RemoteStoreConfig remoteConfig) throws UtilsException {
  52.         return RemoteStoreUtils.readPublicKey(keyId, remoteConfig);
  53.     }
  54.     @Override
  55.     public PublicKey readPublicKey(String keyId, RemoteStoreConfig remoteConfig, ByteArrayOutputStream bout) throws UtilsException{
  56.         return RemoteStoreUtils.readPublicKey(keyId, remoteConfig, bout);
  57.     }
  58.    
  59.     @Override
  60.     public RemoteStoreClientInfo readClientInfo(String keyId, String clientId, RemoteStoreConfig remoteConfig,
  61.             org.openspcoop2.utils.Map<Object> context)
  62.             throws UtilsException {
  63.         throw new UtilsException("Not Implemented");
  64.     }

  65. }