diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/ActivationRecovery.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/ActivationRecovery.java index 6d444133..9ab8425b 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/ActivationRecovery.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/ActivationRecovery.java @@ -19,45 +19,26 @@ */ package io.getlime.security.powerauth.rest.api.model.entity; +import lombok.Data; +import lombok.ToString; + /** * Activation recovery model class for recovery code and PUK. * * @author Roman Strobl, roman.strobl@wultra.com */ +@Data public class ActivationRecovery { - private String recoveryCode; - private String puk; - /** - * Get recovery code. - * @return Recovery code. + * Recovery code. */ - public String getRecoveryCode() { - return recoveryCode; - } - - /** - * Set recovery code. - * @param recoveryCode Recovery code. - */ - public void setRecoveryCode(String recoveryCode) { - this.recoveryCode = recoveryCode; - } + private String recoveryCode; /** - * Get recovery PUK. - * @return Recovery PUK. + * Recovery PUK. */ - public String getPuk() { - return puk; - } + @ToString.Exclude + private String puk; - /** - * Set recovery PUK. - * @param puk Recovery PUK. - */ - public void setPuk(String puk) { - this.puk = puk; - } } \ No newline at end of file diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/NonPersonalizedEncryptedPayloadModel.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/NonPersonalizedEncryptedPayloadModel.java deleted file mode 100644 index a6f3d8fd..00000000 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/NonPersonalizedEncryptedPayloadModel.java +++ /dev/null @@ -1,165 +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.rest.api.model.entity; - -/** - * Class representing a payload encrypted using non-personalized end-to-end encryption. - * - * @author Petr Dvorak, petr@wultra.com - */ -public class NonPersonalizedEncryptedPayloadModel { - - private String applicationKey; - private String sessionIndex; - private String adHocIndex; - private String macIndex; - private String nonce; - private String ephemeralPublicKey; - private String mac; - private String encryptedData; - - /** - * Get application key. - * @return Application key. - */ - public String getApplicationKey() { - return applicationKey; - } - - /** - * Set application key. - * @param applicationKey Application key. - */ - public void setApplicationKey(String applicationKey) { - this.applicationKey = applicationKey; - } - - /** - * Get session index. - * @return Session index. - */ - public String getSessionIndex() { - return sessionIndex; - } - - /** - * Set session index. - * @param sessionIndex Session index. - */ - public void setSessionIndex(String sessionIndex) { - this.sessionIndex = sessionIndex; - } - - /** - * Get ad-hoc index. - * @return Ad-hoc index. - */ - public String getAdHocIndex() { - return adHocIndex; - } - - /** - * Set ad-hoc index. - * @param adHocIndex Ad-hoc index. - */ - public void setAdHocIndex(String adHocIndex) { - this.adHocIndex = adHocIndex; - } - - /** - * Get MAC index. - * @return MAC index. - */ - public String getMacIndex() { - return macIndex; - } - - /** - * Set MAC index. - * @param macIndex MAC index. - */ - public void setMacIndex(String macIndex) { - this.macIndex = macIndex; - } - - /** - * Get nonce. - * @return Nonce. - */ - public String getNonce() { - return nonce; - } - - /** - * Set nonce. - * @param nonce Nonce. - */ - public void setNonce(String nonce) { - this.nonce = nonce; - } - - /** - * Get ephemeral public key. - * @return Ephemeral public key. - */ - public String getEphemeralPublicKey() { - return ephemeralPublicKey; - } - - /** - * Set ephemeral public key. - * @param ephemeralPublicKey Ephemeral public key. - */ - public void setEphemeralPublicKey(String ephemeralPublicKey) { - this.ephemeralPublicKey = ephemeralPublicKey; - } - - /** - * Get MAC. - * @return MAC. - */ - public String getMac() { - return mac; - } - - /** - * Set MAC. - * @param mac MAC. - */ - public void setMac(String mac) { - this.mac = mac; - } - - /** - * Get encrypted data. - * @return Encrypted data. - */ - public String getEncryptedData() { - return encryptedData; - } - - /** - * Set encrypted data. - * @param encryptedData Encrypted data. - */ - public void setEncryptedData(String encryptedData) { - this.encryptedData = encryptedData; - } -} diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/TokenResponsePayload.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/TokenResponsePayload.java index 2e03df3a..40ab659a 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/TokenResponsePayload.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/entity/TokenResponsePayload.java @@ -19,46 +19,26 @@ */ package io.getlime.security.powerauth.rest.api.model.entity; +import lombok.Data; +import lombok.ToString; + /** * Class representing original payload of the encrypted response for the /pa/token endpoint. * * @author Petr Dvorak, petr@wultra.com */ +@Data public class TokenResponsePayload { - private String tokenId; - private String tokenSecret; - - /** - * Get token ID. - * @return Token ID. - */ - public String getTokenId() { - return tokenId; - } - - /** - * Set token ID. - * @param tokenId Token ID. - */ - public void setTokenId(String tokenId) { - this.tokenId = tokenId; - } - /** - * Get token secret. - * @return Token secret. + * Token ID. */ - public String getTokenSecret() { - return tokenSecret; - } + private String tokenId; /** - * Set token secret. - * @param tokenSecret Token secret. + * Token Secret. */ - public void setTokenSecret(String tokenSecret) { - this.tokenSecret = tokenSecret; - } + @ToString.Exclude + private String tokenSecret; } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/exception/RecoveryError.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/exception/RecoveryError.java index 4e792c77..ec1889e1 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/exception/RecoveryError.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/exception/RecoveryError.java @@ -20,22 +20,24 @@ package io.getlime.security.powerauth.rest.api.model.exception; import io.getlime.core.rest.model.base.entity.Error; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; /** * Recovery error. * * @author Roman Strobl, roman.strobl@wultra.com */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) public class RecoveryError extends Error { - private Integer currentRecoveryPukIndex; - /** - * Default constructor. + * Current recovery PUK index. */ - public RecoveryError() { - super(); - } + private Integer currentRecoveryPukIndex; /** * Constructor with error code and message. @@ -57,19 +59,4 @@ public RecoveryError(String code, String message, Integer currentRecoveryPukInde this.currentRecoveryPukIndex = currentRecoveryPukIndex; } - /** - * Get current recovery PUK index. - * @return Current recovery PUK index. - */ - public Integer getCurrentRecoveryPukIndex() { - return currentRecoveryPukIndex; - } - - /** - * Set current recovery PUK index. - * @param currentRecoveryPukIndex Current recovery PUK index. - */ - public void setCurrentRecoveryPukIndex(Integer currentRecoveryPukIndex) { - this.currentRecoveryPukIndex = currentRecoveryPukIndex; - } } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationLayer1Request.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationLayer1Request.java index 057822b3..07a1c758 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationLayer1Request.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationLayer1Request.java @@ -20,6 +20,7 @@ package io.getlime.security.powerauth.rest.api.model.request; import io.getlime.security.powerauth.rest.api.model.entity.ActivationType; +import lombok.Data; import java.util.Map; @@ -29,74 +30,26 @@ * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class ActivationLayer1Request { - private ActivationType type; - private Map identityAttributes; - private Map customAttributes; - private EciesEncryptedRequest activationData; - - /** - * Get activation type. - * @return Activation type. - */ - public ActivationType getType() { - return type; - } - - /** - * Set activation type. - * @param type Activation type. - */ - public void setType(ActivationType type) { - this.type = type; - } - /** - * Get identity attributes. - * @return Identity attributes. + * Activation type. */ - public Map getIdentityAttributes() { - return identityAttributes; - } - - /** - * Set identity attributes. - * @param identityAttributes Identity attributes. - */ - public void setIdentityAttributes(Map identityAttributes) { - this.identityAttributes = identityAttributes; - } - - /** - * Get custom attributes. - * @return Custom attributes. - */ - public Map getCustomAttributes() { - return customAttributes; - } + private ActivationType type; /** - * Set custom attributes. - * @param customAttributes Custom attributes. + * Identity attributes. */ - public void setCustomAttributes(Map customAttributes) { - this.customAttributes = customAttributes; - } + private Map identityAttributes; /** - * Get encrypted activation data. - * @return Encrypted activation data. + * Custom attributes. */ - public EciesEncryptedRequest getActivationData() { - return activationData; - } + private Map customAttributes; /** - * Set encrypted activation data. - * @param activationData Encrypted activation data. + * Encrypted activation data. */ - public void setActivationData(EciesEncryptedRequest activationData) { - this.activationData = activationData; - } + private EciesEncryptedRequest activationData; } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationLayer2Request.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationLayer2Request.java index efafe64b..3e89e2a2 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationLayer2Request.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationLayer2Request.java @@ -19,132 +19,61 @@ */ package io.getlime.security.powerauth.rest.api.model.request; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + /** * Request object for activation layer 2 request. * * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data +@NoArgsConstructor public class ActivationLayer2Request { - private String devicePublicKey; - private String activationOtp; - private String activationName; - private String extras; - private String platform; - private String deviceInfo; - /** - * Default constructor. - */ - public ActivationLayer2Request() { - } - - /** - * Parameterized constructor. - * @param devicePublicKey Device public key. - * @param activationName Activation name. - * @param extras Activation extras. + * Base64 encoded device public key. */ - public ActivationLayer2Request(String devicePublicKey, String activationName, String extras) { - this.devicePublicKey = devicePublicKey; - this.activationName = activationName; - this.extras = extras; - } + private String devicePublicKey; /** - * Get Base64 encoded device public key. - * @return Device public key. + * Additional activation OTP. */ - public String getDevicePublicKey() { - return devicePublicKey; - } + @ToString.Exclude + private String activationOtp; /** - * Set Base64 encoded device public key. - * @param devicePublicKey Device public key. + * Activation name. */ - public void setDevicePublicKey(String devicePublicKey) { - this.devicePublicKey = devicePublicKey; - } + private String activationName; /** - * Get additional activation OTP. - * @return Additional activation OTP. + * Activation extras. */ - public String getActivationOtp() { - return activationOtp; - } + private String extras; /** - * Set additional activation OTP. - * @param activationOtp Additional activation OTP. + * User device platform. */ - public void setActivationOtp(String activationOtp) { - this.activationOtp = activationOtp; - } + private String platform; /** - * Get activation name. - * @return Activation name. + * Information about user device. */ - public String getActivationName() { - return activationName; - } + private String deviceInfo; /** - * Set activation name. + * Parameterized constructor. + * @param devicePublicKey Device public key. * @param activationName Activation name. - */ - public void setActivationName(String activationName) { - this.activationName = activationName; - } - - /** - * Get activation extras. - * @return Activation extras. - */ - public String getExtras() { - return extras; - } - - /** - * Set activation extras. * @param extras Activation extras. */ - public void setExtras(String extras) { + public ActivationLayer2Request(String devicePublicKey, String activationName, String extras) { + this.devicePublicKey = devicePublicKey; + this.activationName = activationName; this.extras = extras; } - /** - * Get user device platform. - * @return User device platform. - */ - public String getPlatform() { - return platform; - } - - /** - * Set user device platform. - * @param platform User device platform. - */ - public void setPlatform(String platform) { - this.platform = platform; - } - - /** - * Get information about user device. - * @return Information about user device. - */ - public String getDeviceInfo() { - return deviceInfo; - } - - /** - * Set information about user device. - * @param deviceInfo Information about user device. - */ - public void setDeviceInfo(String deviceInfo) { - this.deviceInfo = deviceInfo; - } } \ No newline at end of file diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationStatusRequest.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationStatusRequest.java index 2004cfb6..dd7a3aae 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationStatusRequest.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ActivationStatusRequest.java @@ -19,46 +19,26 @@ */ package io.getlime.security.powerauth.rest.api.model.request; +import lombok.Data; +import lombok.ToString; + /** * Request object for /pa/v3/activation/status end-point. * * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class ActivationStatusRequest { - private String activationId; - private String challenge; - - /** - * Get activation ID - * @return Activation ID - */ - public String getActivationId() { - return activationId; - } - - /** - * Set activation ID - * @param activationId Activation ID - */ - public void setActivationId(String activationId) { - this.activationId = activationId; - } - /** - * Get challenge for activation status blob encryption. - * @return Challenge for activation status blob encryption. + * Activation ID. */ - public String getChallenge() { - return challenge; - } + private String activationId; /** - * Set challenge for activation status blob encryption. - * @param challenge Challenge for activation status blob encryption. Exactly 16 bytes encoded in Base64 is expected. + * Challenge for activation status blob encryption. Exactly 16 bytes encoded in Base64 is expected. */ - public void setChallenge(String challenge) { - this.challenge = challenge; - } + @ToString.Exclude + private String challenge; } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ConfirmRecoveryRequestPayload.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ConfirmRecoveryRequestPayload.java index 1258d514..8a3c493e 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ConfirmRecoveryRequestPayload.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/ConfirmRecoveryRequestPayload.java @@ -19,29 +19,20 @@ */ package io.getlime.security.powerauth.rest.api.model.request; +import lombok.Data; + /** * Request object for confirm recovery code ECIES payload. * * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class ConfirmRecoveryRequestPayload { - private String recoveryCode; - /** - * Get recovery code. - * @return Recovery code. + * Recovery code. */ - public String getRecoveryCode() { - return recoveryCode; - } + private String recoveryCode; - /** - * Set recovery code. - * @param recoveryCode Recovery code. - */ - public void setRecoveryCode(String recoveryCode) { - this.recoveryCode = recoveryCode; - } } \ No newline at end of file diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/EciesEncryptedRequest.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/EciesEncryptedRequest.java index bc53a5d4..fadd11dd 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/EciesEncryptedRequest.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/EciesEncryptedRequest.java @@ -19,96 +19,41 @@ */ package io.getlime.security.powerauth.rest.api.model.request; +import lombok.Data; +import lombok.ToString; + /** * Request object with data encrypted by ECIES encryption. * * @author Roman Strobl, roman.strobl@wultra.com */ +@Data public class EciesEncryptedRequest { - private String ephemeralPublicKey; - private String encryptedData; - private String mac; - private String nonce; - private Long timestamp; - - /** - * Get Base64 encoded ephemeral public key. - * @return Ephemeral public key. - */ - public String getEphemeralPublicKey() { - return ephemeralPublicKey; - } - - /** - * Set Base64 encoded ephemeral public key. - * @param ephemeralPublicKey Ephemeral public key. - */ - public void setEphemeralPublicKey(String ephemeralPublicKey) { - this.ephemeralPublicKey = ephemeralPublicKey; - } - /** - * Get Base64 encoded encrypted data. - * @return Encrypted data. + * Base64 encoded ephemeral public key. */ - public String getEncryptedData() { - return encryptedData; - } - - /** - * Set Base64 encoded encrypted data. - * @param encryptedData Encrypted data. - */ - public void setEncryptedData(String encryptedData) { - this.encryptedData = encryptedData; - } - - /** - * Get Base64 encoded MAC of key and data. - * @return MAC of key and data. - */ - public String getMac() { - return mac; - } + private String ephemeralPublicKey; /** - * Set Base64 encoded MAC of key and data. - * @param mac MAC of key and data. + * Base64 encoded encrypted data. */ - public void setMac(String mac) { - this.mac = mac; - } + private String encryptedData; /** - * Get Base64 encoded nonce for IV derivation. - * @return Nonce for IV derivation. + * Base64 encoded MAC of key and data. */ - public String getNonce() { - return nonce; - } + private String mac; /** - * Set Base64 encoded nonce for IV derivation. - * @param nonce Nonce for IV derivation. + * Base64 encoded nonce for IV derivation. */ - public void setNonce(String nonce) { - this.nonce = nonce; - } + @ToString.Exclude + private String nonce; /** - * Get request timestamp as unix timestamp in milliseconds. - * @return Request timestamp. + * Request timestamp as unix timestamp in milliseconds. */ - public Long getTimestamp() { - return timestamp; - } + private Long timestamp; - /** - * Set request timestamp as unix timestamp in milliseconds. - * @param timestamp Request timestamp. - */ - public void setTimestamp(Long timestamp) { - this.timestamp = timestamp; - } } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/TokenRemoveRequest.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/TokenRemoveRequest.java index 231e828b..f86afa58 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/TokenRemoveRequest.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/TokenRemoveRequest.java @@ -19,11 +19,14 @@ */ package io.getlime.security.powerauth.rest.api.model.request; +import lombok.Data; + /** * Class representing request transport object for token removal. * * @author Petr Dvorak, petr@wultra.com */ +@Data public class TokenRemoveRequest { /** @@ -31,19 +34,4 @@ public class TokenRemoveRequest { */ private String tokenId; - /** - * Get token ID. - * @return Token ID. - */ - public String getTokenId() { - return tokenId; - } - - /** - * Set token ID. - * @param tokenId Token ID. - */ - public void setTokenId(String tokenId) { - this.tokenId = tokenId; - } } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/VaultUnlockRequestPayload.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/VaultUnlockRequestPayload.java index 294f3dbb..b579a90e 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/VaultUnlockRequestPayload.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/request/VaultUnlockRequestPayload.java @@ -19,29 +19,20 @@ */ package io.getlime.security.powerauth.rest.api.model.request; +import lombok.Data; + /** * Request object for vault unlock ECIES payload. * * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class VaultUnlockRequestPayload { - private String reason; - /** - * Get vault unlock reason. - * @return Vault unlock reason. + * Vault unlock reason. */ - public String getReason() { - return reason; - } + private String reason; - /** - * Set vault unlock reason. - * @param reason Vault unlock reason. - */ - public void setReason(String reason) { - this.reason = reason; - } } \ No newline at end of file diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationLayer1Response.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationLayer1Response.java index 5d9b764a..a2ed59ce 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationLayer1Response.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationLayer1Response.java @@ -19,6 +19,8 @@ */ package io.getlime.security.powerauth.rest.api.model.response; +import lombok.Data; + import java.util.Map; /** @@ -27,57 +29,22 @@ * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class ActivationLayer1Response { - private EciesEncryptedResponse activationData; - private Map customAttributes; - private Map userInfo; - - /** - * Get encrypted activation data. - * @return Encrypted activation data. - */ - public EciesEncryptedResponse getActivationData() { - return activationData; - } - /** - * Set encrypted activation data. - * @param activationData Encrypted activation data. + * Encrypted activation data. */ - public void setActivationData(EciesEncryptedResponse activationData) { - this.activationData = activationData; - } - - /** - * Get custom attributes for activation. - * @return Custom attributes. - */ - public Map getCustomAttributes() { - return customAttributes; - } + private EciesEncryptedResponse activationData; /** - * Set custom attributes for activation. - * @param customAttributes Custom attributes. + * Custom attributes for activation. */ - public void setCustomAttributes(Map customAttributes) { - this.customAttributes = customAttributes; - } + private Map customAttributes; /** - * Get user info as a map of claims. - * @return User info. + * User info as a map of claims. */ - public Map getUserInfo() { - return userInfo; - } + private Map userInfo; - /** - * Set user info via a map of claims. - * @param userInfo User info. - */ - public void setUserInfo(Map userInfo) { - this.userInfo = userInfo; - } } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationLayer2Response.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationLayer2Response.java index 43e54ffe..db667341 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationLayer2Response.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationLayer2Response.java @@ -20,6 +20,7 @@ package io.getlime.security.powerauth.rest.api.model.response; import io.getlime.security.powerauth.rest.api.model.entity.ActivationRecovery; +import lombok.Data; /** * Response object for activation layer 2. @@ -27,75 +28,27 @@ * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class ActivationLayer2Response { - private String activationId; - private String serverPublicKey; - private String ctrData; - private ActivationRecovery activationRecovery; - - /** - * Get activation ID. - * @return Activation ID. - */ - public String getActivationId() { - return activationId; - } - - /** - * Set activation ID. - * @param activationId Activation ID. - */ - public void setActivationId(String activationId) { - this.activationId = activationId; - } - /** - * Get Base64 encoded server public key. - * @return Server public key. + * Activation ID. */ - public String getServerPublicKey() { - return serverPublicKey; - } - - /** - * Set Base64 encoded server public key. - * @param serverPublicKey Server public key. - */ - public void setServerPublicKey(String serverPublicKey) { - this.serverPublicKey = serverPublicKey; - } - - /** - * Get Base64 encoded counter data. - * @return Counter data. - */ - public String getCtrData() { - return ctrData; - } + private String activationId; /** - * Set Base64 encoded counter data. - * @param ctrData Counter data. + * Base64 encoded server public key. */ - public void setCtrData(String ctrData) { - this.ctrData = ctrData; - } + private String serverPublicKey; /** - * Get activation recovery information. - * @return Activation recovery information. + * Base64 encoded counter data. */ - public ActivationRecovery getActivationRecovery() { - return activationRecovery; - } + private String ctrData; /** - * Set activation recovery information. - * @param activationRecovery Activation recovery information. + * Activation recovery information. */ - public void setActivationRecovery(ActivationRecovery activationRecovery) { - this.activationRecovery = activationRecovery; - } + private ActivationRecovery activationRecovery; } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationRemoveResponse.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationRemoveResponse.java index 0be0bd33..95c34364 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationRemoveResponse.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationRemoveResponse.java @@ -19,30 +19,20 @@ */ package io.getlime.security.powerauth.rest.api.model.response; +import lombok.Data; + /** * Response object for /pa/v3/activation/remove end-point. * * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class ActivationRemoveResponse { - private String activationId; - /** - * Get activation ID - * @return Activation ID + * Activation ID. */ - public String getActivationId() { - return activationId; - } - - /** - * Set activation ID - * @param activationId Activation ID - */ - public void setActivationId(String activationId) { - this.activationId = activationId; - } + private String activationId; } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationStatusResponse.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationStatusResponse.java index 2bfee56d..e418ffb9 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationStatusResponse.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ActivationStatusResponse.java @@ -19,6 +19,9 @@ */ package io.getlime.security.powerauth.rest.api.model.response; +import lombok.Data; +import lombok.ToString; + import java.util.Map; /** @@ -27,75 +30,28 @@ * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class ActivationStatusResponse { - private String activationId; - private String encryptedStatusBlob; - private String nonce; - private Map customObject; - - /** - * Get activation ID - * @return Activation ID - */ - public String getActivationId() { - return activationId; - } - - /** - * Set activation ID - * @param activationId Activation ID - */ - public void setActivationId(String activationId) { - this.activationId = activationId; - } - - /** - * Get encrypted activation status blob - * @return Encrypted activation status blob - */ - public String getEncryptedStatusBlob() { - return encryptedStatusBlob; - } - /** - * Set encrypted activation status blob - * @param cStatusBlob encrypted activation status blob + * Activation ID. */ - public void setEncryptedStatusBlob(String cStatusBlob) { - this.encryptedStatusBlob = cStatusBlob; - } - - /** - * Get nonce for activation status blob encryption. - * @return Nonce for activation status blob encryption. - */ - public String getNonce() { - return nonce; - } + private String activationId; /** - * Set nonce for activation status blob encryption. - * @param nonce Nonce for activation status blob encryption. Exactly 16 bytes encoded in Base64 is expected. + * Encrypted activation status blob. */ - public void setNonce(String nonce) { - this.nonce = nonce; - } + private String encryptedStatusBlob; /** - * Get custom associated object. - * @return Custom associated object + * Nonce for activation status blob encryption. */ - public Map getCustomObject() { - return customObject; - } + @ToString.Exclude + private String nonce; /** - * Set custom associated object - * @param customObject Custom associated object + * Custom associated object. */ - public void setCustomObject(Map customObject) { - this.customObject = customObject; - } + private Map customObject; } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ConfirmRecoveryResponsePayload.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ConfirmRecoveryResponsePayload.java index 41f1e8ed..3820492b 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ConfirmRecoveryResponsePayload.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ConfirmRecoveryResponsePayload.java @@ -19,29 +19,20 @@ */ package io.getlime.security.powerauth.rest.api.model.response; +import lombok.Data; + /** * Response object for confirm recovery code ECIES payload. * * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class ConfirmRecoveryResponsePayload { - private boolean alreadyConfirmed; - /** - * Get whether recovery code was already confirmed. - * @return Whether recovery code was already confirmed. + * Flag indicating whether recovery code was already confirmed. */ - public boolean getAlreadyConfirmed() { - return alreadyConfirmed; - } + private boolean alreadyConfirmed; - /** - * Set whether recovery code was already confirmed. - * @param alreadyConfirmed Whether recovery code was already confirmed. - */ - public void setAlreadyConfirmed(boolean alreadyConfirmed) { - this.alreadyConfirmed = alreadyConfirmed; - } } \ No newline at end of file diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/EciesEncryptedResponse.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/EciesEncryptedResponse.java index fc1ca2df..71017c9a 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/EciesEncryptedResponse.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/EciesEncryptedResponse.java @@ -19,99 +19,40 @@ */ package io.getlime.security.powerauth.rest.api.model.response; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + /** * Response object for endpoints returning data encrypted by ECIES. * * @author Roman Strobl, roman.strobl@wultra.com */ +@Data +@NoArgsConstructor +@AllArgsConstructor public class EciesEncryptedResponse { - private String encryptedData; - private String mac; - private String nonce; - private Long timestamp; - - /** - * Default constructor. - */ - public EciesEncryptedResponse() { - } - /** - * Constructor with Base64 encoded encrypted data and MAC of key and data. - * @param encryptedData Encrypted data. - * @param mac MAC of key and data. - * @param nonce ECIES nonce. - * @param timestamp Unix timestamp in milliseconds. + * Base64 encoded encrypted data payload. */ - public EciesEncryptedResponse(String encryptedData, String mac, String nonce, Long timestamp) { - this.encryptedData = encryptedData; - this.mac = mac; - this.nonce = nonce; - this.timestamp = timestamp; - } - - /** - * Get Base64 encoded encrypted data payload. - * @return Encrypted data. - */ - public String getEncryptedData() { - return encryptedData; - } - - /** - * Set Base64 encoded encrypted data payload. - * @param encryptedData Encrypted data. - */ - public void setEncryptedData(String encryptedData) { - this.encryptedData = encryptedData; - } - - /** - * Get Base64 encoded MAC signature of the response. - * @return MAC of the response. - */ - public String getMac() { - return mac; - } - - /** - * Set Base64 encoded MAC signature of the response. - * @param mac MAC of the response. - */ - public void setMac(String mac) { - this.mac = mac; - } + private String encryptedData; /** - * Get nonce. - * @return Nonce. + * Base64 encoded MAC signature of the response. */ - public String getNonce() { - return nonce; - } + private String mac; /** - * Set nonce. - * @param nonce Nonce. + * Nonce. */ - public void setNonce(String nonce) { - this.nonce = nonce; - } + @ToString.Exclude + private String nonce; /** - * Get response timestamp as unix timestamp in milliseconds. - * @return Response timestamp. + * Response timestamp as unix timestamp in milliseconds. */ - public Long getTimestamp() { - return timestamp; - } + private Long timestamp; - /** - * Set response timestamp as unix timestamp in milliseconds. - * @param timestamp Response timestamp. - */ - public void setTimestamp(Long timestamp) { - this.timestamp = timestamp; - } } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ServiceStatusResponse.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ServiceStatusResponse.java index ece1596e..adb38968 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ServiceStatusResponse.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/ServiceStatusResponse.java @@ -19,6 +19,8 @@ */ package io.getlime.security.powerauth.rest.api.model.response; +import lombok.Data; + import java.util.Date; /** @@ -26,108 +28,37 @@ * * @author Roman Strobl, roman.strobl@wultra.com */ +@Data public class ServiceStatusResponse { - private String applicationName; - private String applicationDisplayName; - private String applicationEnvironment; - private String version; - private Date buildTime; - private Date timestamp; - /** - * Get the application name. - * @return Application name. + * The application name. */ - public String getApplicationName() { - return applicationName; - } - - /** - * Set the application name. - * @param applicationName Application name. - */ - public void setApplicationName(String applicationName) { - this.applicationName = applicationName; - } - - /** - * Get the application display name. - * @return Application display name. - */ - public String getApplicationDisplayName() { - return applicationDisplayName; - } - - /** - * Set the application display name. - * @param applicationDisplayName Application display name. - */ - public void setApplicationDisplayName(String applicationDisplayName) { - this.applicationDisplayName = applicationDisplayName; - } - - /** - * Get application environment name. - * @return Environment name. - */ - public String getApplicationEnvironment() { - return applicationEnvironment; - } - - /** - * Set application environment name. - * @param applicationEnvironment Environment name. - */ - public void setApplicationEnvironment(String applicationEnvironment) { - this.applicationEnvironment = applicationEnvironment; - } + private String applicationName; /** - * Get version. - * @return version. + * The application display name. */ - public String getVersion() { - return version; - } + private String applicationDisplayName; /** - * Set version. - * @param version Version. + * Application environment name. */ - public void setVersion(String version) { - this.version = version; - } + private String applicationEnvironment; /** - * Get build time. - * @return Build time. + * Version. */ - public Date getBuildTime() { - return buildTime; - } + private String version; /** - * Set build time. - * @param buildTime Build time. + * Build time. */ - public void setBuildTime(Date buildTime) { - this.buildTime = buildTime; - } + private Date buildTime; /** - * Get current timestamp. - * @return Timestamp. + * Current timestamp. */ - public Date getTimestamp() { - return timestamp; - } + private Date timestamp; - /** - * Set current timestamp. - * @param timestamp Timestamp. - */ - public void setTimestamp(Date timestamp) { - this.timestamp = timestamp; - } } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/TokenRemoveResponse.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/TokenRemoveResponse.java index a2faa8e0..cb20a8bf 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/TokenRemoveResponse.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/TokenRemoveResponse.java @@ -19,11 +19,14 @@ */ package io.getlime.security.powerauth.rest.api.model.response; +import lombok.Data; + /** * Class representing response transport object for token removal. * * @author Petr Dvorak, petr@wultra.com */ +@Data public class TokenRemoveResponse { /** @@ -31,20 +34,4 @@ public class TokenRemoveResponse { */ private String tokenId; - /** - * Get token ID. - * @return Token ID. - */ - public String getTokenId() { - return tokenId; - } - - /** - * Set token ID. - * @param tokenId Token ID. - */ - public void setTokenId(String tokenId) { - this.tokenId = tokenId; - } - } diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/UpgradeResponsePayload.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/UpgradeResponsePayload.java index bd367b5d..20e055f4 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/UpgradeResponsePayload.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/UpgradeResponsePayload.java @@ -19,29 +19,20 @@ */ package io.getlime.security.powerauth.rest.api.model.response; +import lombok.Data; + /** * Response object for upgrade payload. * * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class UpgradeResponsePayload { - private String ctrData; - /** - * Get counter data. - * @return Counter data. + * Counter data. */ - public String getCtrData() { - return ctrData; - } + private String ctrData; - /** - * Set counter data. - * @param ctrData Counter data. - */ - public void setCtrData(String ctrData) { - this.ctrData = ctrData; - } } \ No newline at end of file diff --git a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/VaultUnlockResponsePayload.java b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/VaultUnlockResponsePayload.java index a222f4bb..8d0f4224 100644 --- a/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/VaultUnlockResponsePayload.java +++ b/powerauth-restful-model/src/main/java/io/getlime/security/powerauth/rest/api/model/response/VaultUnlockResponsePayload.java @@ -19,46 +19,25 @@ */ package io.getlime.security.powerauth.rest.api.model.response; +import lombok.Data; + /** * Response object for vault unlock payload. * * @author Roman Strobl, roman.strobl@wultra.com * */ +@Data public class VaultUnlockResponsePayload { - private String encryptedVaultEncryptionKey; - private boolean signatureValid; - /** - * Get encrypted vault encryption key. - * @return Encrypted vault encryption key. + * Encrypted vault encryption key. */ - public String getEncryptedVaultEncryptionKey() { - return encryptedVaultEncryptionKey; - } - - /** - * Set encrypted vault encryption key. - * @param encryptedVaultEncryptionKey Encrypted vault encryption key. - */ - public void setEncryptedVaultEncryptionKey(String encryptedVaultEncryptionKey) { - this.encryptedVaultEncryptionKey = encryptedVaultEncryptionKey; - } + private String encryptedVaultEncryptionKey; /** - * Get whether signature is valid. - * @return Whether signature is valid. + * Flag indicating if the signature is valid. */ - public boolean isSignatureValid() { - return signatureValid; - } + private boolean signatureValid; - /** - * Set whether signature is valid. - * @param signatureValid Whether signature is valid. - */ - public void setSignatureValid(boolean signatureValid) { - this.signatureValid = signatureValid; - } } \ No newline at end of file