Tabnine Logo
unauthorized
Code IndexAdd Tabnine to your IDE (free)

How to use
unauthorized
in
views.html.defaultpages

Best Java code snippets using views.html.defaultpages.unauthorized (Showing top 10 results out of 315)

origin: com.typesafe.play/play_2.10

/**
 * Generates an alternative result if the user is not authenticated; the default a simple '401 Not Authorized' page.
 */
public Result onUnauthorized(Context ctx) {
  return unauthorized(views.html.defaultpages.unauthorized.render());
}

origin: com.typesafe.play/play_2.12

/**
 * Invoked when a client makes a request that was forbidden.
 * <p>
 * Returns Results.forbidden (401) with the included template from {@code views.html.defaultpages.unauthorized} as the content.
 *
 * @param request The forbidden request.
 * @param message The error message.
 * @return a CompletionStage containing the Result.
 */
protected CompletionStage<Result> onForbidden(RequestHeader request, String message) {
  return CompletableFuture.completedFuture(Results.forbidden(views.html.defaultpages.unauthorized.render(request.asScala())));
}
origin: com.typesafe.play/play

/**
 * Invoked when a client makes a request that was forbidden.
 * <p>
 * Returns Results.forbidden (401) with the included template from {@code views.html.defaultpages.unauthorized} as the content.
 *
 * @param request The forbidden request.
 * @param message The error message.
 * @return a CompletionStage containing the Result.
 */
protected CompletionStage<Result> onForbidden(RequestHeader request, String message) {
  return CompletableFuture.completedFuture(Results.forbidden(views.html.defaultpages.unauthorized.render(request.asScala())));
}
origin: com.typesafe.play/play_2.11

/**
 * Invoked when a client makes a request that was forbidden.
 * <p>
 * Returns Results.forbidden (401) with the included template from {@code views.html.defaultpages.unauthorized} as the content.
 *
 * @param request The forbidden request.
 * @param message The error message.
 * @return a CompletionStage containing the Result.
 */
protected CompletionStage<Result> onForbidden(RequestHeader request, String message) {
  return CompletableFuture.completedFuture(Results.forbidden(views.html.defaultpages.unauthorized.render(request.asScala())));
}
origin: com.typesafe.play/play_2.12

/**
 * Generates an alternative result if the user is not authenticated; the default a simple '401 Not Authorized' page.
 *
 * @param req the current request
 * @return a <code>401 Not Authorized</code> result
 */
public Result onUnauthorized(Request req) {
  return unauthorized(views.html.defaultpages.unauthorized.render(req.asScala()));
}
origin: com.typesafe.play/play

/**
 * Generates an alternative result if the user is not authenticated; the default a simple '401 Not Authorized' page.
 *
 * @param req the current request
 * @return a <code>401 Not Authorized</code> result
 */
public Result onUnauthorized(Request req) {
  return unauthorized(views.html.defaultpages.unauthorized.render(req.asScala()));
}
origin: com.typesafe.play/play_2.10

/**
 * Invoked when a client makes a request that was forbidden.
 *
 * @param request The forbidden request.
 * @param message The error message.
 */
protected F.Promise<Result> onForbidden(RequestHeader request, String message) {
  return F.Promise.<Result>pure(Results.forbidden(views.html.defaultpages.unauthorized.render()));
}
origin: com.typesafe.play/play_2.11

/**
 * Generates an alternative result if the user is not authenticated; the default a simple '401 Not Authorized' page.
 *
 * @param req the current request
 * @return a <code>401 Not Authorized</code> result
 */
public Result onUnauthorized(Request req) {
  return unauthorized(views.html.defaultpages.unauthorized.render(req.asScala()));
}
origin: be.objectify/deadbolt-java_2.12

@Override
public CompletionStage<Result> onAuthFailure(final Http.RequestHeader requestHeader,
                       final Optional<String> content)
{
  return CompletableFuture.completedFuture(unauthorized.render(requestHeader.asScala()))
              .thenApply(Results::unauthorized);
}
origin: be.objectify/deadbolt-java_2.11

@Override
public CompletionStage<Result> onAuthFailure(final Http.RequestHeader requestHeader,
                       final Optional<String> content)
{
  return CompletableFuture.completedFuture(unauthorized.render(requestHeader.asScala()))
              .thenApply(Results::unauthorized);
}
views.html.defaultpagesunauthorized

Most used methods

  • render

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Option (scala)
  • 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