Tabnine Logo
UnauthenticatedException.getMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getMessage
method
in
org.apache.shiro.authz.UnauthenticatedException

Best Java code snippets using org.apache.shiro.authz.UnauthenticatedException.getMessage (Showing top 3 results out of 315)

origin: theonedev/onedev

@Override
public Response toResponse(UnauthenticatedException exception) {
  ResponseBuilder builder = Response.status(Response.Status.UNAUTHORIZED);
  builder.header("WWW-Authenticate", HttpServletRequest.BASIC_AUTH + " realm=\"" + appName + "\"");
  if (exception.getMessage() != null)
    builder = builder.entity(exception.getMessage()).type("text/plain");
  
  return builder.build();
}

origin: com.walmartlabs.concord.server/concord-server

  @Override
  protected Response convert(UnauthenticatedException exception, String id) {
    return Response.status(Status.UNAUTHORIZED)
        .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE)
        .entity(exception.getMessage())
        .build();
  }
}
origin: ueboot/ueboot

@ExceptionHandler(UnauthenticatedException.class)
@ResponseStatus(HttpStatus.FORBIDDEN)
@ResponseBody
public Response<Void> handleException(UnauthenticatedException e) {
  log.debug("{} was thrown", e.getClass(), e);
  ShiroExceptionHandler.remove();
  shiroEventListener.afterLogin(currentUserName.get(),false,e.getMessage());
  return new Response<>(HttpStatus.FORBIDDEN.value() + "", "当前用户未登录", null);
}
org.apache.shiro.authzUnauthenticatedExceptiongetMessage

Popular methods of UnauthenticatedException

  • <init>
    Constructs a new UnauthenticatedException.

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JButton (javax.swing)
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
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