Examples of SVNUserNameAuthentication


Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

        }
        // end of probe. if we were asked for username for ssh and didn't find anything
        // report something default.
        if (ISVNAuthenticationManager.USERNAME.equals(kind)) {
            // user auth shouldn't be null.
            return new SVNUserNameAuthentication("", isAuthStorageEnabled());
        }
        SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm);
        return null;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

                    return new SVNPasswordAuthentication(myUserName, myPassword, myIsStore);
                } else if (ISVNAuthenticationManager.USERNAME.equals(kind)) {
                    if (myUserName == null || "".equals(myUserName)) {
                        String userName = System.getProperty("svnkit.ssh2.author", System.getProperty("javasvn.ssh2.author"));
                        if (userName != null) {
                            return new SVNUserNameAuthentication(userName, myIsStore);
                        }
                        return null;
                    }
                    return new SVNUserNameAuthentication(myUserName, myIsStore);
                }
            }
            return null;
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

                            return new SVNSSHAuthentication(userName, new File(path), passphrase, portNumber, authMayBeStored);
                        } else if (password != null) {
                            return new SVNSSHAuthentication(userName, password, portNumber, authMayBeStored);
                        }                   
                    } else if (ISVNAuthenticationManager.USERNAME.equals(kind)) {
                        return new SVNUserNameAuthentication(userName, authMayBeStored);
                    }
                } catch (SVNException e) {
                    //
                }
            }
View Full Code Here

Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

                        return new SVNSSHAuthentication((String) info.get("username"), keyPath, (String) info.get("passphrase"), port, authMayBeStored);
                    } else if (info.get("password") != null) {
                        return new SVNSSHAuthentication((String) info.get("username"), (String) info.get("password"), port, authMayBeStored);
                    }
                } else if (ISVNAuthenticationManager.USERNAME.equals(kind)) {
                    return new SVNUserNameAuthentication((String) info.get("username"), authMayBeStored);
                }
            }
            return null;
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

                // authentication to connect via SSH, then calls this method one more time
                // to get the user name. Perhaps svn takes user name on its own, separate
                // from OS user name? In any case, we need to return the same user name.
                // I don't set the cred field here, so that the 1st credential for ssh
                // won't get clobbered.
                return new SVNUserNameAuthentication(username, false);
            if (kind.equals(ISVNAuthenticationManager.PASSWORD)) {
                logWriter.println("Passing user name " + username + " and password you entered");
                cred = new PasswordCredential(username, password);
            }
            if (kind.equals(ISVNAuthenticationManager.SSH)) {
View Full Code Here

Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

                while (auth != null) {
                    String userName = auth.getUserName();
                    if (userName == null || "".equals(userName.trim())) {
                        userName = System.getProperty("user.name");
                    }
                    auth = new SVNUserNameAuthentication(userName, auth.isStorageAllowed());
                    if (userName != null && !"".equals(userName.trim())) {
                        authManager.acknowledgeAuthentication(true, ISVNAuthenticationManager.USERNAME, realm, null, auth);
                        return auth.getUserName();
                    }
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.AUTHN_CREDS_UNAVAILABLE, "Empty user name is not allowed");
View Full Code Here

Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

        } else if(ISVNAuthenticationManager.USERNAME.equals(kind)) {
            String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url);
            if (myPrompt instanceof PromptUserPasswordUser) {
                PromptUserPasswordUser prompt3 = (PromptUserPasswordUser) myPrompt;
                if (prompt3.promptUser(realm, userName, authMayBeStored))  {
                    return new SVNUserNameAuthentication(prompt3.getUsername(), prompt3.userAllowedSave());
                }
                return getDefaultUserNameCredentials(userName);
            } else if (myPrompt instanceof PromptUserPassword3) {
                PromptUserPassword3 prompt3 = (PromptUserPassword3) myPrompt;
                if (prompt3.prompt(realm, userName, authMayBeStored))  {
                    return new SVNUserNameAuthentication(prompt3.getUsername(), prompt3.userAllowedSave());
                }
                return getDefaultUserNameCredentials(userName);
            }
            if (myPrompt.prompt(realm, userName)) {
                return new SVNUserNameAuthentication(myPrompt.getUsername(), false);
            }
            return getDefaultUserNameCredentials(userName);
        } else if(!ISVNAuthenticationManager.PASSWORD.equals(kind)){
            return null;
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

    }

    private SVNAuthentication getDefaultUserNameCredentials(String userName) {
        if (ADAPTER_DEFAULT_PROMPT_CLASS.equals(myPrompt.getClass().getName())) {
            // return default username, despite prompt was 'cancelled'.
            return new SVNUserNameAuthentication(userName, false);
        }
        return null;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

            }
            String userName = auth.getUserName();
            if (userName == null || "".equals(userName.trim())) {
                userName = System.getProperty("user.name");
            }
            auth = new SVNUserNameAuthentication(userName, auth.isStorageAllowed());
            repository.getAuthenticationManager().acknowledgeAuthentication(true, ISVNAuthenticationManager.USERNAME, host, null, auth);
            expandedTunnel += " --tunnel-user " + userName;
           
            repository.setExternalUserName(userName);
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.auth.SVNUserNameAuthentication

                            "".equals(author.getUserName())) {
                        repository.setExternalUserName("");
                    } else {
                        repository.setExternalUserName(author.getUserName());
                    }
                    author = new SVNUserNameAuthentication(userName, author.isStorageAllowed());
                    authManager.acknowledgeAuthentication(true, ISVNAuthenticationManager.USERNAME, realm, null, author);
   
                    if ("".equals(repository.getExternalUserName())) {
                        mySession.execCommand(SVNSERVE_COMMAND);
                    } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.