code: public TokenAuthorisation getSessionTokenLogin(TokenAuthorisation token, String username, String password) throws MovieDbException {
          TmdbParameters parameters = new TmdbParameters();
  
          if (!token.getSuccess()) {
              throw new MovieDbException(ApiExceptionType.AUTH_FAILURE, "Authorisation token was not successful!");
          }
  
          parameters.add(Param.TOKEN, token.getRequestToken());
          parameters.add(Param.USERNAME, username);
          parameters.add(Param.PASSWORD, password);
  
          URL url = new ApiUrl(apiKey, MethodBase.AUTH).subMethod(MethodSub.TOKEN_VALIDATE).buildUrl(parameters);
          String webpage = httpTools.getRequest(url);
  
          try {
              return MAPPER.readValue(webpage, TokenAuthorisation.class);
          } catch (IOException ex) {
              throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get Session Token", url, ex);
          }
      }
docs: This method is used to generate a session id for user based
  authentication. User must provide their username and password
  
  A session id is required in order to use any of the write methods.
  
  @param token Session token
  @param username User's username
  @param password User's password
  @return
  @throws MovieDbException