Class CredentialsProviderUserInfo

  • All Implemented Interfaces:
    com.jcraft.jsch.UIKeyboardInteractive, com.jcraft.jsch.UserInfo

    public class CredentialsProviderUserInfo
    extends java.lang.Object
    implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive
    A JSch UserInfo adapter for a CredentialsProvider.
    • Field Detail

      • uri

        private final URIish uri
      • password

        private java.lang.String password
      • passphrase

        private java.lang.String passphrase
    • Constructor Detail

      • CredentialsProviderUserInfo

        public CredentialsProviderUserInfo​(com.jcraft.jsch.Session session,
                                           CredentialsProvider credentialsProvider)
        Wrap a CredentialsProvider to make it suitable for use with JSch.
        Parameters:
        session - the JSch session this UserInfo will support authentication on.
        credentialsProvider - the provider that will perform the authentication.
    • Method Detail

      • createURI

        private static URIish createURI​(com.jcraft.jsch.Session session)
      • getPassword

        public java.lang.String getPassword()
        Specified by:
        getPassword in interface com.jcraft.jsch.UserInfo
      • getPassphrase

        public java.lang.String getPassphrase()
        Specified by:
        getPassphrase in interface com.jcraft.jsch.UserInfo
      • promptPassphrase

        public boolean promptPassphrase​(java.lang.String msg)
        Specified by:
        promptPassphrase in interface com.jcraft.jsch.UserInfo
      • promptPassword

        public boolean promptPassword​(java.lang.String msg)
        Specified by:
        promptPassword in interface com.jcraft.jsch.UserInfo
      • promptYesNo

        public boolean promptYesNo​(java.lang.String msg)
        Specified by:
        promptYesNo in interface com.jcraft.jsch.UserInfo
      • showMessage

        public void showMessage​(java.lang.String msg)
        Specified by:
        showMessage in interface com.jcraft.jsch.UserInfo
      • promptKeyboardInteractive

        public java.lang.String[] promptKeyboardInteractive​(java.lang.String destination,
                                                            java.lang.String name,
                                                            java.lang.String instruction,
                                                            java.lang.String[] prompt,
                                                            boolean[] echo)
        Specified by:
        promptKeyboardInteractive in interface com.jcraft.jsch.UIKeyboardInteractive