Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #488: Use Lombok for RESTful model classes #489

Merged
merged 2 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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, [email protected]
*/
@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;
petrdvorak marked this conversation as resolved.
Show resolved Hide resolved

/**
* Set recovery PUK.
* @param puk Recovery PUK.
*/
public void setPuk(String puk) {
this.puk = puk;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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, [email protected]
*/
@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;
petrdvorak marked this conversation as resolved.
Show resolved Hide resolved

}
Original file line number Diff line number Diff line change
Expand Up @@ -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, [email protected]
*/
@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.
Expand All @@ -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;
}
}
Loading
Loading