congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
UserManager.create
Code IndexAdd Tabnine to your IDE (free)

How to use
create
method
in
sockslib.server.manager.UserManager

Best Java code snippets using sockslib.server.manager.UserManager.create (Showing top 2 results out of 315)

origin: theotherp/nzbhydra2

private void initAuth(Arguments arguments, SocksServerBuilder builder) throws IllegalArgumentException {
  String authValue = arguments.getValue(Arrays.asList("-a", "--auth"), null);
  if (authValue != null) {
    UserManager userManager = new MemoryBasedUserManager();
    for (String user : authValue.split(",")) {
      String[] userPassword = user.split(":");
      String username = userPassword[0];
      String password = userPassword[1];
      userManager.create(new User(username, password));
    }
    builder.setSocksMethods(new UsernamePasswordMethod()).setUserManager(userManager);
  } else {
    builder.setSocksMethods(new NoAuthenticationRequiredMethod());
  }
}
origin: fengyouchao/sockslib

private void initAuth(Arguments arguments, SocksServerBuilder builder) throws IllegalArgumentException {
 String authValue = arguments.getValue(Arrays.asList("-a", "--auth"), null);
 if (authValue != null) {
  UserManager userManager = new MemoryBasedUserManager();
  for (String user : authValue.split(",")) {
   String[] userPassword = user.split(":");
   String username = userPassword[0];
   String password = userPassword[1];
   userManager.create(new User(username, password));
  }
  builder.setSocksMethods(new UsernamePasswordMethod()).setUserManager(userManager);
 } else {
  builder.setSocksMethods(new NoAuthenticationRequiredMethod());
 }
}
sockslib.server.managerUserManagercreate

Popular methods of UserManager

  • addUser
    Adds a user to the UserManager.
  • check
    Finds a user by username and password. If there is no user matches the username and password, return
  • delete
    Deletes a user by username.

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • putExtra (Intent)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JFileChooser (javax.swing)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now