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

How to use
RedirectAuthHandler
in
io.vertx.ext.web.handler

Best Java code snippets using io.vertx.ext.web.handler.RedirectAuthHandler (Showing top 20 results out of 315)

origin: vert-x3/vertx-examples

router.route("/private/*").handler(RedirectAuthHandler.create(authProvider, "/loginpage.html"));
origin: io.vertx/vertx-lang-groovy

 public static void parseCredentials(io.vertx.ext.web.handler.RedirectAuthHandler j_receiver, io.vertx.ext.web.RoutingContext context, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> handler) {
  j_receiver.parseCredentials(context,
   handler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>>() {
   public void handle(io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject> ar) {
    handler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
   }
  } : null);
 }
}
origin: io.vertx/vertx-rx-java

/**
 * Add a set of required authorities for this auth handler
 * @param authorities the set of authorities
 * @return a reference to this, so the API can be used fluently
 */
public io.vertx.rxjava.ext.web.handler.AuthHandler addAuthorities(Set<String> authorities) { 
 delegate.addAuthorities(authorities);
 return this;
}
origin: io.vertx/vertx-rx-java

/**
 * Authorizes the given user against all added authorities.
 * @param user a user.
 * @param handler the handler for the result.
 */
public void authorize(io.vertx.rxjava.ext.auth.User user, Handler<AsyncResult<Void>> handler) { 
 delegate.authorize(user.getDelegate(), handler);
}
origin: vert-x3/vertx-rx

/**
 * Add a required authority for this auth handler
 * @param authority the authority
 * @return a reference to this, so the API can be used fluently
 */
public io.vertx.rxjava.ext.web.handler.AuthHandler addAuthority(String authority) { 
 delegate.addAuthority(authority);
 return this;
}
origin: io.vertx/vertx-rx-java

/**
 * Something has happened, so handle it.
 * @param event the event to handle
 */
public void handle(io.vertx.rxjava.ext.web.RoutingContext event) { 
 delegate.handle(event.getDelegate());
}
origin: io.vertx/vertx-rx-java

/**
 * Parses the credentials from the request into a JsonObject. The implementation should
 * be able to extract the required info for the auth provider in the format the provider
 * expects.
 * @param context the routing context
 * @param handler the handler to be called once the information is available.
 */
public void parseCredentials(io.vertx.rxjava.ext.web.RoutingContext context, Handler<AsyncResult<JsonObject>> handler) { 
 delegate.parseCredentials(context.getDelegate(), handler);
}
origin: vert-x3/vertx-rx

/**
 * Add a set of required authorities for this auth handler
 * @param authorities the set of authorities
 * @return a reference to this, so the API can be used fluently
 */
public io.vertx.rxjava.ext.web.handler.AuthHandler addAuthorities(Set<String> authorities) { 
 delegate.addAuthorities(authorities);
 return this;
}
origin: vert-x3/vertx-rx

/**
 * Authorizes the given user against all added authorities.
 * @param user a user.
 * @param handler the handler for the result.
 */
public void authorize(io.vertx.rxjava.ext.auth.User user, Handler<AsyncResult<Void>> handler) { 
 delegate.authorize(user.getDelegate(), handler);
}
origin: io.vertx/vertx-rx-java

/**
 * Add a required authority for this auth handler
 * @param authority the authority
 * @return a reference to this, so the API can be used fluently
 */
public io.vertx.rxjava.ext.web.handler.AuthHandler addAuthority(String authority) { 
 delegate.addAuthority(authority);
 return this;
}
origin: vert-x3/vertx-rx

/**
 * Something has happened, so handle it.
 * @param event the event to handle
 */
public void handle(io.vertx.rxjava.ext.web.RoutingContext event) { 
 delegate.handle(event.getDelegate());
}
origin: vert-x3/vertx-examples

router.route("/private/*").handler(RedirectAuthHandler.create(authProvider, "/loginpage.html"));
origin: vert-x3/vertx-rx

/**
 * Parses the credentials from the request into a JsonObject. The implementation should
 * be able to extract the required info for the auth provider in the format the provider
 * expects.
 * @param context the routing context
 * @param handler the handler to be called once the information is available.
 */
public void parseCredentials(io.vertx.rxjava.ext.web.RoutingContext context, Handler<AsyncResult<JsonObject>> handler) { 
 delegate.parseCredentials(context.getDelegate(), handler);
}
origin: vert-x3/vertx-web

@Override
protected AuthHandler createAuthHandler(AuthProvider authProvider) {
 return RedirectAuthHandler.create(authProvider);
}
origin: io.vertx/vertx-web

@Override
protected AuthHandler createAuthHandler(AuthProvider authProvider) {
 return RedirectAuthHandler.create(authProvider);
}
origin: vert-x3/vertx-web

@Override
public void setUp() throws Exception {
 super.setUp();
 JsonObject authConfig = new JsonObject().put("properties_path", "classpath:login/loginusers.properties");
 AuthProvider authProvider = ShiroAuth.create(vertx, new ShiroAuthOptions().setType(ShiroAuthRealmType.PROPERTIES).setConfig(authConfig));
 // create a chain
 chain = ChainAuthHandler.create();
 chain
  .append(JWTAuthHandler.create(null))
  .append(BasicAuthHandler.create(authProvider))
  .append(RedirectAuthHandler.create(authProvider));
 router.route().handler(SessionHandler.create(LocalSessionStore.create(vertx)));
 router.route().handler(chain);
 router.route().handler(ctx -> ctx.response().end());
}
origin: io.vertx/vertx-rx-java

/**
 * Create a handler
 * @param authProvider the auth service to use
 * @param loginRedirectURL the url to redirect the user to
 * @return the handler
 */
public static io.vertx.rxjava.ext.web.handler.AuthHandler create(io.vertx.rxjava.ext.auth.AuthProvider authProvider, String loginRedirectURL) { 
 io.vertx.rxjava.ext.web.handler.AuthHandler ret = io.vertx.rxjava.ext.web.handler.AuthHandler.newInstance(io.vertx.ext.web.handler.RedirectAuthHandler.create(authProvider.getDelegate(), loginRedirectURL));
 return ret;
}
origin: io.vertx/vertx-rx-java

/**
 * Create a handler
 * @param authProvider the auth service to use
 * @param loginRedirectURL the url to redirect the user to
 * @param returnURLParam the name of param used to store return url information in session
 * @return the handler
 */
public static io.vertx.rxjava.ext.web.handler.AuthHandler create(io.vertx.rxjava.ext.auth.AuthProvider authProvider, String loginRedirectURL, String returnURLParam) { 
 io.vertx.rxjava.ext.web.handler.AuthHandler ret = io.vertx.rxjava.ext.web.handler.AuthHandler.newInstance(io.vertx.ext.web.handler.RedirectAuthHandler.create(authProvider.getDelegate(), loginRedirectURL, returnURLParam));
 return ret;
}
origin: vert-x3/vertx-rx

/**
 * Create a handler
 * @param authProvider the auth service to use
 * @param loginRedirectURL the url to redirect the user to
 * @return the handler
 */
public static io.vertx.rxjava.ext.web.handler.AuthHandler create(io.vertx.rxjava.ext.auth.AuthProvider authProvider, String loginRedirectURL) { 
 io.vertx.rxjava.ext.web.handler.AuthHandler ret = io.vertx.rxjava.ext.web.handler.AuthHandler.newInstance(io.vertx.ext.web.handler.RedirectAuthHandler.create(authProvider.getDelegate(), loginRedirectURL));
 return ret;
}
origin: io.vertx/vertx-rx-java

/**
 * Create a handler
 * @param authProvider the auth service to use
 * @return the handler
 */
public static io.vertx.rxjava.ext.web.handler.AuthHandler create(io.vertx.rxjava.ext.auth.AuthProvider authProvider) { 
 io.vertx.rxjava.ext.web.handler.AuthHandler ret = io.vertx.rxjava.ext.web.handler.AuthHandler.newInstance(io.vertx.ext.web.handler.RedirectAuthHandler.create(authProvider.getDelegate()));
 return ret;
}
io.vertx.ext.web.handlerRedirectAuthHandler

Javadoc

An auth handler that's used to handle auth by redirecting user to a custom login page.

Most used methods

  • create
    Create a handler
  • parseCredentials
  • addAuthorities
  • addAuthority
  • authorize
  • handle

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • 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