All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.shapestone.authentication.Credential Maven / Gradle / Ivy

The newest version!
package com.shapestone.authentication;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import static com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY;

/**
 * Name: Michael Williams
 * Date: 9/9/16.
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(exclude = {"modifiedDate", "sourcePartyId"})
@JsonIgnoreProperties(ignoreUnknown = true)
public class Credential {

  private String credentialId;
  private String forPartyId;
  private String forPartyType;
  private String username;
  private String password;
  @JsonProperty(access = WRITE_ONLY)
  private String salt;
  @JsonProperty(access = WRITE_ONLY)
  private Integer saltLogRounds;
  @JsonProperty(access = WRITE_ONLY)
  private String hashedPassword;
  private String modifierPartyId;
  private String customerPartyId;
  private Long modifiedDate;
  private Long createdDate;

  public Credential(String username) {
    this.username = username;
  }

  public Credential(Credential credential) {
    this.credentialId = credential.credentialId;
    this.forPartyId = credential.forPartyId;
    this.forPartyType = credential.forPartyType;
    this.username = credential.username;
    this.password = credential.password;
    this.salt = credential.salt;
    this.saltLogRounds = credential.saltLogRounds;
    this.hashedPassword = credential.hashedPassword;
    this.modifierPartyId = credential.modifierPartyId;
    this.customerPartyId = credential.customerPartyId;
    this.modifiedDate = credential.modifiedDate;
    this.createdDate = credential.createdDate;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy