Class PromptingAuthenticator


  • public class PromptingAuthenticator
    extends Authenticator
    A simple Authenticator which will prompt the user to enter the required name and password with a Swing dialog. Names and passwords are cached by default, but this behaviour can be disabled by calling setCaching(boolean). To use, simply call Authenticator.setDefault(new PromptingAuthenticator(component))
    Since:
    2.14.1
    • Constructor Detail

      • PromptingAuthenticator

        public PromptingAuthenticator()
        Create a new PromptingAuthenticator with no root component specified
      • PromptingAuthenticator

        public PromptingAuthenticator​(Component root)
        Create a new PromptingAuthenticator and specify the Component the dialog should be opened above
        Parameters:
        root - the root component for the dialog
    • Method Detail

      • setHandleNegotiate

        public void setHandleNegotiate​(boolean negotiate)
        If true, this Authenticator will prompt for the "Negotiate" method of authentication. This has been causing problems on some customer sites, so we have added the option to bypass it.
        Since:
        2.20.2
      • setRoot

        public void setRoot​(Component root)
        Set the root Component the dialog should be opened above
        Parameters:
        root - the root component for the dialog
      • setCaching

        public void setCaching​(boolean cache)
        Set whether to cache names/passwords - if true (the default), the dialog will be presented with the previous values already specified.
        Parameters:
        cache - whether to cache names/password