Interface ClientAuthenticator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.net.Authenticator getAuthenticator()
      Get a standard Java authenticator for HTTP and other standard network connections
      char[] getNewPassword​(java.awt.Component parent, java.lang.String serverInfo, java.lang.String username)
      Get new user password
      boolean isSSHKeyAvailable()  
      boolean processPasswordCallbacks​(java.lang.String title, java.lang.String serverType, java.lang.String serverName, javax.security.auth.callback.NameCallback nameCb, javax.security.auth.callback.PasswordCallback passCb, javax.security.auth.callback.ChoiceCallback choiceCb, AnonymousCallback anonymousCb, java.lang.String loginError)
      Process Ghidra Server password authentication callbacks.
      boolean processSSHSignatureCallbacks​(java.lang.String serverName, javax.security.auth.callback.NameCallback nameCb, SSHSignatureCallback sshCb)
      Process Ghidra Server SSH authentication callbacks.
      boolean promptForReconnect​(java.awt.Component parent, java.lang.String message)
      Prompt user for reconnect
    • Method Detail

      • getAuthenticator

        java.net.Authenticator getAuthenticator()
        Get a standard Java authenticator for HTTP and other standard network connections
        Returns:
        authenticator object
      • processPasswordCallbacks

        boolean processPasswordCallbacks​(java.lang.String title,
                                         java.lang.String serverType,
                                         java.lang.String serverName,
                                         javax.security.auth.callback.NameCallback nameCb,
                                         javax.security.auth.callback.PasswordCallback passCb,
                                         javax.security.auth.callback.ChoiceCallback choiceCb,
                                         AnonymousCallback anonymousCb,
                                         java.lang.String loginError)
        Process Ghidra Server password authentication callbacks.
        Parameters:
        title - password prompt title if GUI is used
        serverType - type of server (label associated with serverName)
        serverName - name of server
        nameCb - provides storage for user login name. A null indicates that the default user name will be used, @see ClientUtil#getUserName()
        passCb - provides storage for user password, @see PasswordCallback#setPassword(char[])
        choiceCb - specifies choice between NT Domain authentication (index=0) and local password file authentication (index=1). Set selected index to specify authenticator to be used,
        anonymousCb - may be used to request anonymous read-only access to the server. A null is specified if anonymous access has not been enabed on the server.
        loginError - previous login error message or null for first attempt
        Returns:
        See Also:
        A null is specified if no choice is available (password authenticator determined by server configuration)., AnonymousCallback.setAnonymousAccessRequested(boolean)
      • promptForReconnect

        boolean promptForReconnect​(java.awt.Component parent,
                                   java.lang.String message)
        Prompt user for reconnect
        Parameters:
        parent - dialog parent component or null if not applicable
        message -
        Returns:
        return true if reconnect should be attempted
      • getNewPassword

        char[] getNewPassword​(java.awt.Component parent,
                              java.lang.String serverInfo,
                              java.lang.String username)
        Get new user password
        Parameters:
        parent - dialog parent component or null if not applicable
        serverInfo - server host info
        username -
        Returns:
        new password or null if password should not be changed, if not null array will be cleared by caller
      • isSSHKeyAvailable

        boolean isSSHKeyAvailable()
        Returns:
        true if SSH private key is available for authentication
      • processSSHSignatureCallbacks

        boolean processSSHSignatureCallbacks​(java.lang.String serverName,
                                             javax.security.auth.callback.NameCallback nameCb,
                                             SSHSignatureCallback sshCb)
        Process Ghidra Server SSH authentication callbacks.
        Parameters:
        serverName - name of server
        nameCb - provides storage for user login name. A null indicates that the default user name will be used, @see ClientUtil#getUserName().
        sshCb - provides authentication token to be signed with private key, @see SSHAuthenticationCallback#sign(SSHPrivateKey)
        Returns: