Tabnine Logo
AuthenticationController.canLogin
Code IndexAdd Tabnine to your IDE (free)

How to use
canLogin
method
in
com.atlassian.sal.api.auth.AuthenticationController

Best Java code snippets using com.atlassian.sal.api.auth.AuthenticationController.canLogin (Showing top 1 results out of 315)

origin: com.atlassian.oauth/atlassian-oauth-service-provider-plugin

private Result getUserLoginResult(HttpServletRequest request, HttpServletResponse response, OAuthMessage message, Consumer consumer, Principal user) {
  // if a user is provided, they must exist and be able to login
  if (user != null && !authenticationController.canLogin(user, request)) {
    LOG.info("Access denied because user:'{}' cannot login", user.getName());
    sendError(response, HttpServletResponse.SC_UNAUTHORIZED, message);
    return new Result.Failure(new OAuthProblem.PermissionDenied(user.getName()));
  }
  LOG.info("Authenticated app '{}' as user '{}' successfully", consumer.getKey(), user == null ? "null" : user.getName());
  return new Result.Success(user);
}
com.atlassian.sal.api.authAuthenticationControllercanLogin

Popular methods of AuthenticationController

  • shouldAttemptAuthentication

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for WebStorm
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