Gets the password on record.

@param username the username
@return the password on record
@throws IOException Signals that an I/O exception has occurred.
775319
private String getPasswordOnRecord(final String username) throws IOException {
        try (val stream = Files.lines(fileName.getFile().toPath())) {
            return stream.map(line -> line.split(this.separator))
                .filter(lineFields -> {
                    val userOnRecord = lineFields[0];
                    return username.equals(userOnRecord);
                })
                .map(lineFields -> lineFields[1])
                .findFirst()
                .orElse(null);
        }
    }
481636
public User get(String name) {

        User user = (User) userList.get(name);

        if (user == null) {
            throw Error.error(ErrorCode.X_28501, name);
        }

        return user;
    }
509304
public Login login(TokenResult token, String username, String password)
      throws Exception {
    return login(token, username, password, null);
  }
776185
public static dbuser get(nitro_service service, String username) throws Exception{
		dbuser obj = new dbuser();
		obj.set_username(username);
		dbuser response = (dbuser) obj.get_resource(service);
		return response;
	}
98800
@CommandArgument
  public void passwd(
      @OptionArgument("username") String username,
      @OptionArgument("password") String password) {

    User user = users.get(username);

    if (user != null) {
      user.salt = passwd.generateSalt();
      user.hash = passwd.getEncryptedPassword(password, user.salt);
    } else {
      System.err.println(String.format("User '%s' does not exist", username));
    }

  }
1273379
public Connection getConnection() throws IOException {
		Connection conn = null;
		try {
			if (this.datasource != null) {
				try {
					Class.forName(datasource.get("driver"));
				} catch (ClassNotFoundException e) {
					throw new IOException("Load jdbc driver fail: " + datasource.get("driver"));
				}
				String url = datasource.get("url");
				String user = datasource.get("user");
				String password = datasource.get("password");
				if (StringUtils.isNoneBlank(user)) {
					conn = DriverManager.getConnection(url, user, password);
				} else {
					conn = DriverManager.getConnection(url);
				}
				conn.setAutoCommit(datasource.getBoolean("auto_commit", true));
			}
		} catch (Exception e) {
			throw new IOException(e);
		}
		return conn;
	}
121936
public Principal authenticate(String username, char password[]) 
    throws NamingException
	{
		DirContext ctx = null;
		try
		{
			String userDN = toDN(username);
			ctx = initContext(userDN, password);

			return new X500Principal(userDN);
		}
		finally
		{
			if(ctx != null)
				try{ ctx.close(); } catch(Exception e){e.printStackTrace();}
		}
	}
1210749
def get_user_by_password(self, username, password):
        
        try:
            user = self.get(username=username)
        except User.DoesNotExist:
            return None
        
        if bcrypt.hashpw(password, user.pass_hash) == user.pass_hash:
            return user
        else:
            return None
792181
public final OAuthCredentialsResponse execute() throws IOException {
    HttpRequestFactory requestFactory = transport.createRequestFactory();
    HttpRequest request =
        requestFactory.buildRequest(usePost ? HttpMethods.POST : HttpMethods.GET, this, null);
    createParameters().intercept(request);
    HttpResponse response = request.execute();
    response.setContentLoggingLimit(0);
    OAuthCredentialsResponse oauthResponse = new OAuthCredentialsResponse();
    UrlEncodedParser.parse(response.parseAsString(), oauthResponse);
    return oauthResponse;
  }
1171720
public Login login(String username, String password) throws Exception {
    return login(username, password, null);
  }
156114
public EntryRecord getRecord(Object key, byte[] serializedKey) throws IOException {
      int segment = (key.hashCode() & Integer.MAX_VALUE) % segments.length;
      lock.readLock().lock();
      try {
         return IndexNode.applyOnLeaf(segments[segment], serializedKey, segments[segment].rootReadLock(), IndexNode.ReadOperation.GET_RECORD);
      } finally {
         lock.readLock().unlock();
      }
   }
359094
def get_password(self, service, username):
        
        items = self._find_passwords(service, username)
        if not items:
            return None

        secret = items[0].secret
        return (
            secret
            if isinstance(secret, six.text_type) else
            secret.decode('utf-8')
        )
19245
public SFTP auth(String username, String password) {
        return username(username).password(password);
    }
714922
public static User get(AlluxioConfiguration conf) throws IOException {
    if (!SecurityUtils.isAuthenticationEnabled(conf)) {
      throw new IOException(ExceptionMessage.AUTHENTICATION_IS_NOT_ENABLED.getMessage());
    }
    return sUserThreadLocal.get();
  }
1072021
public static SimpleConnectionAuthenticator getAuthenticationRequest(String userName, String password)
    {
        SimpleConnectionAuthenticator authenticator = null;
        if (userName != null || password != null)
        {
            authenticator = new SimpleConnectionAuthenticator(userName, password);
        }
        return authenticator;
    }
1052154
public OvhMember serviceName_role_roleId_member_username_GET(String serviceName, String roleId, String username) throws IOException {
		String qPath = "/dbaas/logs/{serviceName}/role/{roleId}/member/{username}";
		StringBuilder sb = path(qPath, serviceName, roleId, username);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhMember.class);
	}
920601
public int getRawRecordData(Rec record)
    {
        int iErrorCode = super.getRawRecordData(record);
        this.getRawFieldData(record.getField(UserInfo.USER_NAME));
        this.getRawFieldData(record.getField(UserInfo.PASSWORD));
        return iErrorCode;
    }