Class ExtractDuoAuthenticationFromHeaders

    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • autoAuthenticationSupported

        private boolean autoAuthenticationSupported
        Whether "auto" should be the default for factor and device.
      • clientAddressTrusted

        private boolean clientAddressTrusted
        Whether to trust, and extract, the client address.
      • factorHeaderName

        @Nonnull
        @NotEmpty
        private String factorHeaderName
        Header name for factor.
      • deviceHeaderName

        @Nonnull
        @NotEmpty
        private String deviceHeaderName
        Header name for device.
      • passcodeHeaderName

        @Nonnull
        @NotEmpty
        private String passcodeHeaderName
        Header name for passcode.
    • Constructor Detail

      • ExtractDuoAuthenticationFromHeaders

        ExtractDuoAuthenticationFromHeaders()
        Constructor.
    • Method Detail

      • setFactorHeader

        public void setFactorHeader​(@Nonnull @NotEmpty
                                    String headerName)
        Set the factor header name.
        Parameters:
        headerName - the factor header name
      • setDeviceHeader

        public void setDeviceHeader​(@Nonnull @NotEmpty
                                    String headerName)
        Set the device header name.
        Parameters:
        headerName - the factor header name
      • setPasscodeHeader

        public void setPasscodeHeader​(@Nonnull @NotEmpty
                                      String headerName)
        Set the passcode header name.
        Parameters:
        headerName - the factor header name
      • isClientAddressTrusted

        public boolean isClientAddressTrusted()
        Get whether the client address should be trusted for use in API calls.
        Returns:
        whether client address should be trusted
      • setClientAdddressTrusted

        public void setClientAdddressTrusted​(boolean flag)
        Set whether the client address should be trusted for use in API calls.
        Parameters:
        flag - flag to set
      • isAutoAuthenticationSupported

        public boolean isAutoAuthenticationSupported()
        Get whether "auto" is the default setting.
        Returns:
        whether "auto" is the default setting
      • setAutoAuthenticationSupported

        public void setAutoAuthenticationSupported​(boolean flag)
        Set whether "auto" is the default setting.
        Parameters:
        flag - flag to set
      • setPushInfoLookupStrategy

        public void setPushInfoLookupStrategy​(@Nullable
                                              Function<ProfileRequestContext,​Map<String,​String>> strategy)
        Set lookup strategy for AuthAPI pushinfo parameter.
        Parameters:
        strategy - lookup strategy
      • extractHeaders

        protected void extractHeaders​(@Nonnull
                                      DuoAuthenticationContext context)
        Extracts the Duo API arguments passed in via the request headers.
        Parameters:
        context - the DuoApiAuthContext to store the parameters in