getServiceStatus() {
- ServiceStatusResponse response = new ServiceStatusResponse();
- response.setApplicationName(powerAuthWebServiceConfiguration.getApplicationName());
- response.setApplicationDisplayName(powerAuthWebServiceConfiguration.getApplicationDisplayName());
- response.setApplicationEnvironment(powerAuthWebServiceConfiguration.getApplicationEnvironment());
- if (buildProperties != null) {
- response.setVersion(buildProperties.getVersion());
- response.setBuildTime(Date.from(buildProperties.getTime()));
- }
- response.setTimestamp(new Date());
- return new ObjectResponse<>(response);
- }
-}
diff --git a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/controller/v2/CustomActivationController.java b/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/controller/v2/CustomActivationController.java
deleted file mode 100644
index ce12e42f..00000000
--- a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/controller/v2/CustomActivationController.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * PowerAuth integration libraries for RESTful API applications, examples and
- * related software components
- *
- * Copyright (C) 2018 Wultra s.r.o.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package io.getlime.security.powerauth.app.rest.api.spring.controller.v2;
-
-import com.wultra.security.powerauth.client.PowerAuthClient;
-import com.wultra.security.powerauth.client.v2.CreateActivationResponse;
-import io.getlime.core.rest.model.base.request.ObjectRequest;
-import io.getlime.core.rest.model.base.response.ObjectResponse;
-import io.getlime.security.powerauth.rest.api.base.encryption.PowerAuthNonPersonalizedEncryptor;
-import io.getlime.security.powerauth.rest.api.base.exception.PowerAuthActivationException;
-import io.getlime.security.powerauth.rest.api.base.provider.CustomActivationProvider;
-import io.getlime.security.powerauth.rest.api.model.entity.ActivationType;
-import io.getlime.security.powerauth.rest.api.model.entity.NonPersonalizedEncryptedPayloadModel;
-import io.getlime.security.powerauth.rest.api.model.request.v2.ActivationCreateCustomRequest;
-import io.getlime.security.powerauth.rest.api.model.request.v2.ActivationCreateRequest;
-import io.getlime.security.powerauth.rest.api.model.response.v2.ActivationCreateResponse;
-import io.getlime.security.powerauth.rest.api.spring.encryption.EncryptorFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Sample controller for a custom activation implementation.
- *
- * PowerAuth protocol versions:
- *
- *
- * @author Petr Dvorak, petr@wultra.com
- */
-@RestController("customActivationControllerV2")
-@RequestMapping(value = "/pa/activation/direct")
-public class CustomActivationController {
-
- private static final Logger logger = LoggerFactory.getLogger(CustomActivationController.class);
-
- private PowerAuthClient powerAuthClient;
-
- private EncryptorFactory encryptorFactory;
-
- private CustomActivationProvider activationProvider;
-
- @Autowired
- public void setPowerAuthClient(PowerAuthClient powerAuthClient) {
- this.powerAuthClient = powerAuthClient;
- }
-
- @Autowired
- public void setEncryptorFactory(EncryptorFactory encryptorFactory) {
- this.encryptorFactory = encryptorFactory;
- }
-
- @Autowired(required = false)
- public void setPowerAuthActivationProvider(CustomActivationProvider activationProvider) {
- this.activationProvider = activationProvider;
- }
-
- /**
- * Sample custom activation implementation for version 2 of activations.
- *
- * @param encryptedRequest Activation request encrypted using non-personalised end-to-end encryption.
- * @return Encrypted activation response.
- * @throws PowerAuthActivationException In case custom activation fails.
- */
- @RequestMapping(value = "create", method = RequestMethod.POST)
- public ObjectResponse createActivationV2(
- @RequestBody ObjectRequest encryptedRequest
- ) throws PowerAuthActivationException {
- try {
-
- // Check if there is any user provider to be autowired
- if (activationProvider == null) {
- logger.warn("Activation provider is missing");
- throw new PowerAuthActivationException();
- }
-
- // Prepare an encryptor
- final PowerAuthNonPersonalizedEncryptor encryptor = encryptorFactory.buildNonPersonalizedEncryptor(encryptedRequest);
- if (encryptor == null) {
- logger.warn("Encryptor is not available");
- throw new PowerAuthActivationException();
- }
-
- // Decrypt the request object
- ActivationCreateCustomRequest request = encryptor.decrypt(encryptedRequest, ActivationCreateCustomRequest.class);
-
- if (request == null) {
- logger.warn("Invalid request in activation create");
- throw new PowerAuthActivationException();
- }
-
- // Create context for passing parameters between activation provider calls
- Map context = new LinkedHashMap<>();
-
- // Lookup user ID using a provided identity
- final Map identity = request.getIdentity();
- String userId = activationProvider.lookupUserIdForAttributes(identity, context);
-
- // If no user was found or user ID is invalid, return error
- if (userId == null || userId.equals("") || userId.length() > 255) {
- logger.warn("User ID is invalid: {}", userId);
- throw new PowerAuthActivationException();
- }
-
- // Create activation for a looked up user and application related to the given application key
- ActivationCreateRequest acr = request.getPowerauth();
- CreateActivationResponse response = powerAuthClient.v2().createActivation(
- acr.getApplicationKey(),
- userId,
- acr.getActivationIdShort(),
- acr.getActivationName(),
- acr.getActivationNonce(),
- acr.getEphemeralPublicKey(),
- acr.getEncryptedDevicePublicKey(),
- acr.getExtras(),
- acr.getApplicationSignature()
- );
-
- // Process custom attributes using a custom logic
- final Map customAttributes = request.getCustomAttributes();
- activationProvider.processCustomActivationAttributes(customAttributes, response.getActivationId(), userId, null, ActivationType.CUSTOM, context);
-
- // Prepare the created activation response data
- ActivationCreateResponse createResponse = new ActivationCreateResponse();
- createResponse.setActivationId(response.getActivationId());
- createResponse.setEphemeralPublicKey(response.getEphemeralPublicKey());
- createResponse.setActivationNonce(response.getActivationNonce());
- createResponse.setEncryptedServerPublicKey(response.getEncryptedServerPublicKey());
- createResponse.setEncryptedServerPublicKeySignature(response.getEncryptedServerPublicKeySignature());
-
- // Encrypt response object
- final ObjectResponse powerAuthApiResponse = encryptor.encrypt(createResponse);
-
- // Check if activation should be committed instantly and if yes, perform commit
- if (activationProvider.shouldAutoCommitActivation(identity, customAttributes, response.getActivationId(), userId, null, ActivationType.CUSTOM, context)) {
- powerAuthClient.commitActivation(response.getActivationId(), null);
- }
-
- // Return response
- return powerAuthApiResponse;
-
- } catch (Exception ex) {
- logger.warn("Create activation failed, error: {}", ex.getMessage());
- logger.debug(ex.getMessage(), ex);
- throw new PowerAuthActivationException();
- }
-
- }
-}
diff --git a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/controller/v2/EncryptedDataExchangeController.java b/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/controller/v2/EncryptedDataExchangeController.java
deleted file mode 100644
index efb308c4..00000000
--- a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/controller/v2/EncryptedDataExchangeController.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * PowerAuth integration libraries for RESTful API applications, examples and
- * related software components
- *
- * Copyright (C) 2018 Wultra s.r.o.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package io.getlime.security.powerauth.app.rest.api.spring.controller.v2;
-
-import io.getlime.core.rest.model.base.request.ObjectRequest;
-import io.getlime.core.rest.model.base.response.ObjectResponse;
-import io.getlime.security.powerauth.crypto.lib.model.exception.CryptoProviderException;
-import io.getlime.security.powerauth.crypto.lib.model.exception.GenericCryptoException;
-import io.getlime.security.powerauth.rest.api.base.encryption.PowerAuthNonPersonalizedEncryptor;
-import io.getlime.security.powerauth.rest.api.base.exception.PowerAuthEncryptionException;
-import io.getlime.security.powerauth.rest.api.model.entity.NonPersonalizedEncryptedPayloadModel;
-import io.getlime.security.powerauth.rest.api.spring.encryption.EncryptorFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.security.InvalidKeyException;
-
-/**
- * Sample end-point demonstrating how to receive and send encrypted data.
- *
- * PowerAuth protocol versions:
- *
- *
- * @author Roman Strobl, roman.strobl@wultra.com
- */
-@RestController("encryptedDataExchangeControllerV2")
-public class EncryptedDataExchangeController {
-
- private static final Logger logger = LoggerFactory.getLogger(EncryptedDataExchangeController.class);
-
- private EncryptorFactory encryptorFactory;
-
- @Autowired
- public void setEncryptorFactory(EncryptorFactory encryptorFactory) {
- this.encryptorFactory = encryptorFactory;
- }
-
- /**
- * Sample encrypted data exchange.
- *
- * @param request Encrypted request.
- * @return Encrypted response.
- * @throws PowerAuthEncryptionException In case encryption or decryption fails.
- */
- @RequestMapping(value = "exchange", method = RequestMethod.POST)
- public ObjectResponse exchange(@RequestBody ObjectRequest request) throws PowerAuthEncryptionException {
- if (request == null) {
- logger.warn("Invalid request in exchange method");
- throw new PowerAuthEncryptionException();
- }
-
- // Prepare an encryptor
- final PowerAuthNonPersonalizedEncryptor encryptor = encryptorFactory.buildNonPersonalizedEncryptor(request);
- if (encryptor == null) {
- logger.warn("Encryptor is not available");
- throw new PowerAuthEncryptionException();
- }
-
- // Decrypt the request object
- byte[] requestDataBytes;
- try {
- requestDataBytes = encryptor.decrypt(request);
- } catch (GenericCryptoException | CryptoProviderException | InvalidKeyException ex) {
- logger.warn("Encryption failed, error: {}", ex.getMessage());
- logger.debug(ex.getMessage(), ex);
- throw new PowerAuthEncryptionException();
- }
-
- if (requestDataBytes == null) {
- logger.warn("Invalid request data in exchange method");
- throw new PowerAuthEncryptionException();
- }
-
- String requestData = new String(requestDataBytes);
-
- // Return a slightly different String containing original data in response
- String responseData = "Server successfully decrypted data: " + requestData;
-
- // Encrypt response data
- ObjectResponse encryptedResponse;
- try {
- encryptedResponse = encryptor.encrypt(responseData.getBytes());
- } catch (GenericCryptoException | CryptoProviderException | InvalidKeyException ex) {
- logger.warn("Encryption failed, error: {}", ex.getMessage());
- logger.debug(ex.getMessage(), ex);
- throw new PowerAuthEncryptionException();
- }
-
- return encryptedResponse;
- }
-
-
-}
diff --git a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/controller/v3/EncryptedDataExchangeController.java b/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/controller/v3/EncryptedDataExchangeController.java
deleted file mode 100644
index 5c3aa594..00000000
--- a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/controller/v3/EncryptedDataExchangeController.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * PowerAuth integration libraries for RESTful API applications, examples and
- * related software components
- *
- * Copyright (C) 2018 Wultra s.r.o.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package io.getlime.security.powerauth.app.rest.api.spring.controller.v3;
-
-import io.getlime.security.powerauth.app.rest.api.spring.model.request.DataExchangeRequest;
-import io.getlime.security.powerauth.app.rest.api.spring.model.response.DataExchangeResponse;
-import io.getlime.security.powerauth.crypto.lib.encryptor.ecies.model.EciesScope;
-import io.getlime.security.powerauth.rest.api.base.authentication.PowerAuthApiAuthentication;
-import io.getlime.security.powerauth.rest.api.base.encryption.EciesEncryptionContext;
-import io.getlime.security.powerauth.rest.api.base.exception.PowerAuthAuthenticationException;
-import io.getlime.security.powerauth.rest.api.base.exception.PowerAuthEncryptionException;
-import io.getlime.security.powerauth.rest.api.base.exception.authentication.PowerAuthSignatureInvalidException;
-import io.getlime.security.powerauth.rest.api.spring.annotation.EncryptedRequestBody;
-import io.getlime.security.powerauth.rest.api.spring.annotation.PowerAuth;
-import io.getlime.security.powerauth.rest.api.spring.annotation.PowerAuthEncryption;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * Sample end-point demonstrating how to receive and send encrypted data.
- *
- * PowerAuth protocol versions:
- *
- *
- * @author Roman Strobl, roman.strobl@wultra.com
- */
-@RestController("encryptedDataExchangeControllerV3")
-@RequestMapping(value = "/exchange")
-public class EncryptedDataExchangeController {
-
- private final static Logger logger = LoggerFactory.getLogger(EncryptedDataExchangeController.class);
-
- /**
- * Sample encrypted data exchange in application scope.
- *
- * @param request Data exchange request.
- * @param eciesContext ECIES context.
- * @return Data exchange response.
- * @throws PowerAuthEncryptionException In case encryption or decryption fails.
- */
- @RequestMapping(value = "v3/application", method = RequestMethod.POST)
- @PowerAuthEncryption(scope = EciesScope.APPLICATION_SCOPE)
- public DataExchangeResponse exchangeInApplicationScope(@EncryptedRequestBody DataExchangeRequest request,
- EciesEncryptionContext eciesContext) throws PowerAuthEncryptionException {
-
- if (eciesContext == null) {
- logger.debug("Encryption failed");
- throw new PowerAuthEncryptionException();
- }
-
- // Return a slightly different String containing original data in response
- return new DataExchangeResponse("Server successfully decrypted signed data: " + (request == null ? "''" : request.getData()) + ", scope: " + eciesContext.getEciesScope());
- }
-
- /**
- * Sample encrypted data exchange in activation scope.
- *
- * @param request Data exchange request.
- * @param eciesContext ECIES context.
- * @return Data exchange response.
- * @throws PowerAuthEncryptionException In case encryption or decryption fails.
- */
- @RequestMapping(value = "v3/activation", method = RequestMethod.POST)
- @PowerAuthEncryption(scope = EciesScope.ACTIVATION_SCOPE)
- public DataExchangeResponse exchangeInActivationScope(@EncryptedRequestBody DataExchangeRequest request,
- EciesEncryptionContext eciesContext) throws PowerAuthEncryptionException {
-
- if (eciesContext == null) {
- logger.debug("Encryption failed");
- throw new PowerAuthEncryptionException();
- }
-
- // Return a slightly different String containing original data in response
- return new DataExchangeResponse("Server successfully decrypted signed data: " + (request == null ? "''" : request.getData()) + ", scope: " + eciesContext.getEciesScope());
- }
-
- /**
- * Sample signed and encrypted data exchange.
- *
- * @param request Data exchange request.
- * @param eciesContext ECIES context.
- * @param auth PowerAuth authentication object.
- * @return Data exchange response.
- * @throws PowerAuthAuthenticationException In case signature validation fails.
- * @throws PowerAuthEncryptionException In case encryption or decryption fails.
- */
- @RequestMapping(value = "v3/signed", method = RequestMethod.POST)
- @PowerAuth(resourceId = "/exchange/v3/signed")
- @PowerAuthEncryption(scope = EciesScope.ACTIVATION_SCOPE)
- public DataExchangeResponse exchangeSignedAndEncryptedData(@EncryptedRequestBody DataExchangeRequest request,
- EciesEncryptionContext eciesContext,
- PowerAuthApiAuthentication auth) throws PowerAuthAuthenticationException, PowerAuthEncryptionException {
-
- if (auth == null || auth.getUserId() == null) {
- logger.debug("Signature validation failed");
- throw new PowerAuthSignatureInvalidException();
- }
-
- if (eciesContext == null) {
- logger.debug("Encryption failed");
- throw new PowerAuthEncryptionException();
- }
-
- // Return a slightly different String containing original data in response
- return new DataExchangeResponse("Server successfully decrypted data and verified signature, request data: " + (request == null ? "''" : request.getData()) + ", user ID: " + auth.getUserId());
- }
-
- /**
- * Sample signed and encrypted data exchange of String data.
- *
- * @param requestData Request with String data.
- * @param eciesContext ECIES context.
- * @param auth PowerAuth authentication object.
- * @return Data exchange response.
- * @throws PowerAuthAuthenticationException In case signature validation fails.
- * @throws PowerAuthEncryptionException In case encryption or decryption fails.
- */
- @RequestMapping(value = "v3/signed/string", method = RequestMethod.POST)
- @PowerAuth(resourceId = "/exchange/v3/signed/string")
- @PowerAuthEncryption(scope = EciesScope.ACTIVATION_SCOPE)
- public String exchangeSignedAndEncryptedDataString(@EncryptedRequestBody String requestData,
- EciesEncryptionContext eciesContext,
- PowerAuthApiAuthentication auth) throws PowerAuthAuthenticationException, PowerAuthEncryptionException {
-
- if (auth == null || auth.getUserId() == null) {
- logger.debug("Signature validation failed");
- throw new PowerAuthSignatureInvalidException();
- }
-
- if (eciesContext == null) {
- logger.debug("Encryption failed");
- throw new PowerAuthEncryptionException();
- }
-
- // Return a slightly different String containing original data in response
- return "Server successfully decrypted data and verified signature, request data: " + requestData + ", user ID: " + auth.getUserId();
- }
-
- /**
- * Sample signed and encrypted data exchange of raw data as byte[].
- *
- * @param requestData Request with raw byte[] data.
- * @param eciesContext ECIES context.
- * @param auth PowerAuth authentication object.
- * @return Data exchange response.
- * @throws PowerAuthAuthenticationException In case signature validation fails.
- * @throws PowerAuthEncryptionException In case encryption or decryption fails.
- */
- @RequestMapping(value = "v3/signed/raw", method = RequestMethod.POST)
- @PowerAuth(resourceId = "/exchange/v3/signed/raw")
- @PowerAuthEncryption(scope = EciesScope.ACTIVATION_SCOPE)
- public byte[] exchangeSignedAndEncryptedDataRaw(@EncryptedRequestBody byte[] requestData,
- EciesEncryptionContext eciesContext,
- PowerAuthApiAuthentication auth) throws PowerAuthAuthenticationException, PowerAuthEncryptionException {
-
- if (auth == null || auth.getUserId() == null) {
- logger.debug("Signature validation failed");
- throw new PowerAuthSignatureInvalidException();
- }
-
- if (eciesContext == null) {
- logger.debug("Encryption failed");
- throw new PowerAuthEncryptionException();
- }
-
- // Return data back for verification
- return requestData;
- }
-
-}
diff --git a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/errorhandling/DefaultExceptionHandler.java b/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/errorhandling/DefaultExceptionHandler.java
deleted file mode 100644
index 66fe3d9a..00000000
--- a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/errorhandling/DefaultExceptionHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * PowerAuth integration libraries for RESTful API applications, examples and
- * related software components
- *
- * Copyright (C) 2018 Wultra s.r.o.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package io.getlime.security.powerauth.app.rest.api.spring.errorhandling;
-
-import io.getlime.core.rest.model.base.entity.Error;
-import io.getlime.core.rest.model.base.response.ErrorResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Implementation of a default exception handler for the demo server.
- *
- * @author Petr Dvorak, petr@wultra.com
- *
- */
-@ControllerAdvice
-public class DefaultExceptionHandler {
-
- private static final Logger logger = LoggerFactory.getLogger(DefaultExceptionHandler.class);
-
- /**
- * Handle Exception exceptions.
- * @param exception Exception instance.
- * @return Error response.
- */
- @ExceptionHandler(value = Exception.class)
- @ResponseStatus(value = HttpStatus.BAD_REQUEST)
- public @ResponseBody ErrorResponse handleException(Exception exception) {
- logger.warn(exception.getMessage(), exception);
- return new ErrorResponse(Error.Code.ERROR_GENERIC, exception);
- }
-
-}
diff --git a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/model/request/DataExchangeRequest.java b/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/model/request/DataExchangeRequest.java
deleted file mode 100644
index 9211e3b0..00000000
--- a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/model/request/DataExchangeRequest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package io.getlime.security.powerauth.app.rest.api.spring.model.request;
-
-/**
- * Sample model class with request data.
- *
- * @author Roman Strobl, roman.strobl@wultra.com
- */
-public class DataExchangeRequest {
-
- private String data;
-
- /**
- * Default constructor.
- */
- public DataExchangeRequest() {
- }
-
- /**
- * Constructor with data.
- * @param data Data.
- */
- public DataExchangeRequest(String data) {
- this.data = data;
- }
-
- /**
- * Get data.
- * @return Data.
- */
- public String getData() {
- return data;
- }
-
- /**
- * Set data.
- * @param data Data.
- */
- public void setData(String data) {
- this.data = data;
- }
-}
diff --git a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/model/response/DataExchangeResponse.java b/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/model/response/DataExchangeResponse.java
deleted file mode 100644
index ca791ae6..00000000
--- a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/model/response/DataExchangeResponse.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package io.getlime.security.powerauth.app.rest.api.spring.model.response;
-
-/**
- * Sample model class with response data.
- *
- * @author Roman Strobl, roman.strobl@wultra.com
- */
-public class DataExchangeResponse {
-
- private String data;
-
- /**
- * Default constructor.
- */
- public DataExchangeResponse() {
- }
-
- /**
- * Constructor with data.
- * @param data Data.
- */
- public DataExchangeResponse(String data) {
- this.data = data;
- }
-
- /**
- * Get data.
- * @return Data.
- */
- public String getData() {
- return data;
- }
-
- /**
- * Set data.
- * @param data Data.
- */
- public void setData(String data) {
- this.data = data;
- }
-}
diff --git a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/provider/DefaultCustomActivationProvider.java b/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/provider/DefaultCustomActivationProvider.java
deleted file mode 100644
index c6e0289f..00000000
--- a/powerauth-restful-server-spring/src/main/java/io/getlime/security/powerauth/app/rest/api/spring/provider/DefaultCustomActivationProvider.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * PowerAuth integration libraries for RESTful API applications, examples and
- * related software components
- *
- * Copyright (C) 2018 Wultra s.r.o.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package io.getlime.security.powerauth.app.rest.api.spring.provider;
-
-import io.getlime.security.powerauth.rest.api.base.provider.CustomActivationProvider;
-import io.getlime.security.powerauth.rest.api.model.entity.ActivationType;
-import org.springframework.stereotype.Component;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Default implementation of CustomActivationProvider interface.
- *
- * @author Roman Strobl, roman.strobl@wultra.com
- */
-@Component
-public class DefaultCustomActivationProvider implements CustomActivationProvider {
-
- @Override
- public String lookupUserIdForAttributes(Map identityAttributes, Map context) {
- return identityAttributes.get("username");
- }
-
- @Override
- public Map processCustomActivationAttributes(Map customAttributes, String activationId, String userId, Long applId, ActivationType activationType, Map context) {
- if (customAttributes != null) {
- // Copy custom attributes
- return new HashMap<>(customAttributes);
- } else {
- return Collections.emptyMap();
- }
- }
-
- @Override
- public boolean shouldAutoCommitActivation(Map identityAttributes, Map customAttributes, String activationId, String userId, Long applId, ActivationType activationType, Map context) {
- return true;
- }
-
- @Override
- public void activationWasCommitted(Map identityAttributes, Map customAttributes, String activationId, String userId, Long applId, ActivationType activationType, Map context) {
- }
-
- @Override
- public Integer getMaxFailedAttemptCount(Map identityAttributes, Map customAttributes, String userId, ActivationType activationType, Map context) {
- // Null value means use value configured on PowerAuth server
- return null;
- }
-
- @Override
- public Long getValidityPeriodDuringActivation(Map identityAttributes, Map customAttributes, String userId, ActivationType activationType, Map context) {
- // Null value means use value configured on PowerAuth server
- return null;
- }
-}
diff --git a/powerauth-restful-server-spring/src/main/resources/application.properties b/powerauth-restful-server-spring/src/main/resources/application.properties
deleted file mode 100644
index 2de95eb4..00000000
--- a/powerauth-restful-server-spring/src/main/resources/application.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# PowerAuth integration libraries for RESTful API applications, examples and
-# related software components
-#
-# Copyright (C) 2018 Wultra s.r.o.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published
-# by the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-
-powerauth.service.url=http://localhost:8080/powerauth-java-server/rest
-powerauth.service.security.clientToken=
-powerauth.service.security.clientSecret=
-
-# PowerAuth Push Service Configuration
-powerauth.integration.service.applicationName=powerauth-restful-server-spring
-powerauth.integration.service.applicationDisplayName=PowerAuth Restful Server (Spring)
-powerauth.integration.service.applicationEnvironment=