public class RedirectAuthHandler extends Object implements AuthHandler, Handler<RoutingContext>
original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static io.vertx.lang.rx.TypeArg<RedirectAuthHandler> |
__TYPE_ARG |
static String |
DEFAULT_LOGIN_REDIRECT_URL
Default path the user will be redirected to
|
static String |
DEFAULT_RETURN_URL_PARAM
Default name of param used to store return url information in session
|
| Constructor and Description |
|---|
RedirectAuthHandler(Object delegate) |
RedirectAuthHandler(RedirectAuthHandler delegate) |
| Modifier and Type | Method and Description |
|---|---|
AuthHandler |
addAuthorities(Set<String> authorities)
Add a set of required authorities for this auth handler
|
AuthHandler |
addAuthority(String authority)
Add a required authority for this auth handler
|
void |
authorize(User user,
Handler<AsyncResult<Void>> handler)
Authorizes the given user against all added authorities.
|
Observable<Void> |
authorizeObservable(User user)
Deprecated.
use
rxAuthorize(io.vertx.rxjava.ext.auth.User) instead |
static AuthHandler |
create(AuthProvider authProvider)
Create a handler
|
static AuthHandler |
create(AuthProvider authProvider,
String loginRedirectURL)
Create a handler
|
static AuthHandler |
create(AuthProvider authProvider,
String loginRedirectURL,
String returnURLParam)
Create a handler
|
boolean |
equals(Object o) |
RedirectAuthHandler |
getDelegate() |
void |
handle(RoutingContext event)
Something has happened, so handle it.
|
int |
hashCode() |
static RedirectAuthHandler |
newInstance(RedirectAuthHandler arg) |
void |
parseCredentials(RoutingContext context,
Handler<AsyncResult<JsonObject>> handler)
Parses the credentials from the request into a JsonObject.
|
Observable<JsonObject> |
parseCredentialsObservable(RoutingContext context)
Deprecated.
|
Single<Void> |
rxAuthorize(User user)
Authorizes the given user against all added authorities.
|
Single<JsonObject> |
rxParseCredentials(RoutingContext context)
Parses the credentials from the request into a JsonObject.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnewInstancepublic static final io.vertx.lang.rx.TypeArg<RedirectAuthHandler> __TYPE_ARG
public static final String DEFAULT_LOGIN_REDIRECT_URL
public static final String DEFAULT_RETURN_URL_PARAM
public RedirectAuthHandler(RedirectAuthHandler delegate)
public RedirectAuthHandler(Object delegate)
public RedirectAuthHandler getDelegate()
getDelegate in interface AuthHandlerpublic void handle(RoutingContext event)
handle in interface Handler<RoutingContext>handle in interface AuthHandlerevent - the event to handlepublic AuthHandler addAuthority(String authority)
addAuthority in interface AuthHandlerauthority - the authoritypublic AuthHandler addAuthorities(Set<String> authorities)
addAuthorities in interface AuthHandlerauthorities - the set of authoritiespublic void parseCredentials(RoutingContext context, Handler<AsyncResult<JsonObject>> handler)
parseCredentials in interface AuthHandlercontext - the routing contexthandler - the handler to be called once the information is available.@Deprecated public Observable<JsonObject> parseCredentialsObservable(RoutingContext context)
rxParseCredentials(io.vertx.rxjava.ext.web.RoutingContext) insteadcontext - the routing contextpublic Single<JsonObject> rxParseCredentials(RoutingContext context)
context - the routing contextpublic void authorize(User user, Handler<AsyncResult<Void>> handler)
authorize in interface AuthHandleruser - a user.handler - the handler for the result.@Deprecated public Observable<Void> authorizeObservable(User user)
rxAuthorize(io.vertx.rxjava.ext.auth.User) insteaduser - a user.public Single<Void> rxAuthorize(User user)
user - a user.public static AuthHandler create(AuthProvider authProvider)
authProvider - the auth service to usepublic static AuthHandler create(AuthProvider authProvider, String loginRedirectURL)
authProvider - the auth service to useloginRedirectURL - the url to redirect the user topublic static AuthHandler create(AuthProvider authProvider, String loginRedirectURL, String returnURLParam)
authProvider - the auth service to useloginRedirectURL - the url to redirect the user toreturnURLParam - the name of param used to store return url information in sessionpublic static RedirectAuthHandler newInstance(RedirectAuthHandler arg)
Copyright © 2021 Eclipse. All rights reserved.