Class DuoHealthCheck


  • @Immutable
    @ThreadSafe
    public final class DuoHealthCheck
    extends Object

    Represents a health check response from Duo's 2FA endpoint.

    Includes a staged builder for fluent generation. Compatible with Jackson deserialization.

    Is immutable, can only be built using the builder and not changed thereafter.

    • Field Detail

      • status

        @Nonnull
        @NotEmpty
        private final String status
        A successful 'OK' or unsuccessful 'FAIL' response.
      • response

        @Nullable
        private final DuoHealthCheckResponse response
        When a successful response was issued, as seconds since Unix EPOCH.
      • code

        @Nullable
        @NotEmpty
        private final String code
        The error response code.
      • timestamp

        @Nullable
        private final String timestamp
        When an unsuccessful response was issued, as seconds since Unix EPOCH.
      • message

        @Nullable
        private final String message
        The error response message.
      • messageDetail

        @Nullable
        private final String messageDetail
        The error response detailed message.
    • Constructor Detail

      • DuoHealthCheck

        private DuoHealthCheck​(DuoHealthCheck.Builder builder)
        Private constructor, can only be called by this builder.
        Parameters:
        builder - the builder to build the instance with
    • Method Detail

      • getStatus

        @Nonnull
        public String getStatus()
        Get the health status of the 2FA endpoint.
        Returns:
        Returns the status.
      • getResponse

        @Nullable
        public DuoHealthCheckResponse getResponse()
        Get the response object.
        Returns:
        Returns the response.
      • getCode

        @Nullable
        public String getCode()
        Get the response code.
        Returns:
        Returns the code.
      • getTimestamp

        @Nullable
        public String getTimestamp()
        Get the timestamp!!
        Returns:
        Returns the timestamp.
      • getMessage

        @Nullable
        public String getMessage()
        Get the response message.
        Returns:
        Returns the message.
      • getMessageDetail

        @Nullable
        public String getMessageDetail()
        Get a detailed response message.
        Returns:
        Returns the messageDetail.