Class CommandLineCredentialsProvider

  • All Implemented Interfaces:
    org.apache.http.client.CredentialsProvider

    public class CommandLineCredentialsProvider
    extends Object
    implements org.apache.http.client.CredentialsProvider
    Prompts for the user to enter HTTP Proxy authentication credentials via the command line.
    Author:
    James Murty
    • Constructor Detail

      • CommandLineCredentialsProvider

        public CommandLineCredentialsProvider()
    • Method Detail

      • setCredentials

        public void setCredentials​(org.apache.http.auth.AuthScope authscope,
                                   org.apache.http.auth.Credentials credentials)
        Specified by:
        setCredentials in interface org.apache.http.client.CredentialsProvider
      • clear

        public void clear()
        Clear credentials.
        Specified by:
        clear in interface org.apache.http.client.CredentialsProvider
      • getCredentials

        public org.apache.http.auth.Credentials getCredentials​(org.apache.http.auth.AuthScope scope)
        Implementation method for the CredentialsProvider interface.

        Based on sample code: InteractiveAuthenticationExample

        Specified by:
        getCredentials in interface org.apache.http.client.CredentialsProvider