Class NetRCCredentialsProvider

  • public class NetRCCredentialsProvider
    extends CredentialsProvider
    Simple .netrc credentials provider. It can lookup the first machine entry from your .netrc file.
    • Constructor Detail

      • NetRCCredentialsProvider

        public NetRCCredentialsProvider()

        Constructor for NetRCCredentialsProvider.

    • Method Detail

      • install

        public static void install()
        Install default provider for the .netrc parser.
      • get

        public boolean get​(URIish uri,
                           CredentialItem... items)
                    throws UnsupportedCredentialItem
        Ask for the credential items to be populated.
        Specified by:
        get in class CredentialsProvider
        uri - the URI of the remote resource that needs authentication.
        items - the items the application requires to complete authentication.
        true if the request was successful and values were supplied; false if the user canceled the request and did not supply all requested values.
        UnsupportedCredentialItem - if one of the items supplied is not supported.
      • isInteractive

        public boolean isInteractive()
        Check if the provider is interactive with the end-user. An interactive provider may try to open a dialog box, or prompt for input on the terminal, and will wait for a user response. A non-interactive provider will either populate CredentialItems, or fail.
        Specified by:
        isInteractive in class CredentialsProvider
        true if the provider is interactive with the end-user.