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

com.yubico.fido.metadata.CodeAccuracyDescriptor Maven / Gradle / Ivy

The newest version!
package com.yubico.fido.metadata;

import java.util.Optional;
import lombok.Builder;
import lombok.Value;
import lombok.extern.jackson.Jacksonized;

/**
 * The CodeAccuracyDescriptor describes the relevant accuracy/complexity aspects of passcode user
 * verification methods.
 *
 * @see FIDO
 *     Metadata Statement §3.2. CodeAccuracyDescriptor dictionary
 */
@Value
@Builder(toBuilder = true)
@Jacksonized
public class CodeAccuracyDescriptor {

  /**
   * @see FIDO
   *     Metadata Statement §3.2. CodeAccuracyDescriptor dictionary
   */
  int base;

  /**
   * @see FIDO
   *     Metadata Statement §3.2. CodeAccuracyDescriptor dictionary
   */
  int minLength;

  Integer maxRetries;
  Integer blockSlowdown;

  /**
   * @see FIDO
   *     Metadata Statement §3.2. CodeAccuracyDescriptor dictionary
   */
  public Optional getMaxRetries() {
    return Optional.ofNullable(maxRetries);
  }

  /**
   * @see FIDO
   *     Metadata Statement §3.2. CodeAccuracyDescriptor dictionary
   */
  public Optional getBlockSlowdown() {
    return Optional.ofNullable(blockSlowdown);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy