congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
UserManager.check
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: theotherp/nzbhydra2

@Override
public void doAuthenticate(Credentials credentials, Session session) throws
    AuthenticationException {
  if (credentials instanceof UsernamePasswordCredentials) {
    String username = credentials.getUserPrincipal().getName();
    String password = credentials.getPassword();
    User user = userManager.check(username, password);
    if (user == null) {
      authenticationFailed(session);
    }
    authenticationSuccess(session, user);
  } else {
    throw new AuthenticationException("Only support Username/Password Authentication");
  }
}
origin: fengyouchao/sockslib

@Override
public void doAuthenticate(Credentials credentials, Session session) throws
  AuthenticationException {
 if (credentials instanceof UsernamePasswordCredentials) {
  String username = credentials.getUserPrincipal().getName();
  String password = credentials.getPassword();
  User user = userManager.check(username, password);
  if (user == null) {
   authenticationFailed(session);
  }
  authenticationSuccess(session, user);
 } else {
  throw new AuthenticationException("Only support Username/Password Authentication");
 }
}
sockslib.server.managerUserManagercheck

Javadoc

Finds a user by username and password. If there is no user matches the username and password, return null

Popular methods of UserManager

  • addUser
    Adds a user to the UserManager.
  • create
  • delete
    Deletes a user by username.

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JPanel (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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