
io.getlime.security.powerauth.lib.nextstep.model.response.GetOperationDetailResponse Maven / Gradle / Ivy
The newest version!
/*
* PowerAuth Web Flow and related software components
* Copyright (C) 2017 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.lib.nextstep.model.response;
import io.getlime.security.powerauth.lib.nextstep.model.entity.*;
import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.UserAccountStatus;
import io.getlime.security.powerauth.lib.nextstep.model.enumeration.AuthMethod;
import io.getlime.security.powerauth.lib.nextstep.model.enumeration.AuthResult;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.PositiveOrZero;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Response object used for getting the operation detail.
*
* @author Petr Dvorak, [email protected]
*/
@Data
public class GetOperationDetailResponse {
@NotBlank
@Size(min = 1, max = 256)
private String operationId;
@NotBlank
@Size(min = 2, max = 256)
private String operationName;
@Size(min = 1, max = 256)
private String userId;
@Size(min = 2, max = 256)
private String organizationId;
private UserAccountStatus accountStatus;
@Size(min = 2, max = 256)
private String operationNameExternal;
@Size(min = 1, max = 256)
private String externalTransactionId;
@NotNull
private AuthResult result;
@NotNull
private Date timestampCreated;
@NotNull
private Date timestampExpires;
@NotNull
@Size(max = 256)
private String operationData;
@NotNull
private final List steps = new ArrayList<>();
@NotNull
private final List history = new ArrayList<>();
@NotNull
private final List afsActions = new ArrayList<>();
private OperationFormData formData;
private AuthMethod chosenAuthMethod;
@PositiveOrZero
private Integer remainingAttempts;
private ApplicationContext applicationContext;
/**
* Get whether operation is expired.
* @return Whether operation is expired.
*/
public boolean isExpired() {
return new Date().after(timestampExpires);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy