public class JWTAuthHandler extends Object implements AuthHandler, io.vertx.core.Handler<RoutingContext>
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<JWTAuthHandler> |
__TYPE_ARG |
Constructor and Description |
---|
JWTAuthHandler(io.vertx.ext.web.handler.JWTAuthHandler delegate) |
JWTAuthHandler(Object 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,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
Authorizes the given user against all added authorities.
|
rx.Observable<Void> |
authorizeObservable(User user)
Deprecated.
use
rxAuthorize(io.vertx.rxjava.ext.auth.User) instead |
static JWTAuthHandler |
create(JWTAuth authProvider)
Create a JWT auth handler
|
static JWTAuthHandler |
create(JWTAuth authProvider,
String skip)
Create a JWT auth handler
|
boolean |
equals(Object o) |
io.vertx.ext.web.handler.JWTAuthHandler |
getDelegate() |
void |
handle(RoutingContext event)
Something has happened, so handle it.
|
int |
hashCode() |
static JWTAuthHandler |
newInstance(io.vertx.ext.web.handler.JWTAuthHandler arg) |
void |
parseCredentials(RoutingContext context,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>> handler)
Parses the credentials from the request into a JsonObject.
|
rx.Observable<io.vertx.core.json.JsonObject> |
parseCredentialsObservable(RoutingContext context)
Deprecated.
|
rx.Single<Void> |
rxAuthorize(User user)
Authorizes the given user against all added authorities.
|
rx.Single<io.vertx.core.json.JsonObject> |
rxParseCredentials(RoutingContext context)
Parses the credentials from the request into a JsonObject.
|
JWTAuthHandler |
setAudience(List<String> audience)
Set the audience list
|
JWTAuthHandler |
setIgnoreExpiration(boolean ignoreExpiration)
Set whether expiration is ignored
|
JWTAuthHandler |
setIssuer(String issuer)
Set the issuer
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<JWTAuthHandler> __TYPE_ARG
public JWTAuthHandler(io.vertx.ext.web.handler.JWTAuthHandler delegate)
public JWTAuthHandler(Object delegate)
public io.vertx.ext.web.handler.JWTAuthHandler getDelegate()
getDelegate
in interface AuthHandler
public void handle(RoutingContext event)
handle
in interface io.vertx.core.Handler<RoutingContext>
handle
in interface AuthHandler
event
- the event to handlepublic AuthHandler addAuthority(String authority)
addAuthority
in interface AuthHandler
authority
- the authoritypublic AuthHandler addAuthorities(Set<String> authorities)
addAuthorities
in interface AuthHandler
authorities
- the set of authoritiespublic void parseCredentials(RoutingContext context, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>> handler)
parseCredentials
in interface AuthHandler
context
- the routing contexthandler
- the handler to be called once the information is available.@Deprecated public rx.Observable<io.vertx.core.json.JsonObject> parseCredentialsObservable(RoutingContext context)
rxParseCredentials(io.vertx.rxjava.ext.web.RoutingContext)
insteadcontext
- the routing contextpublic rx.Single<io.vertx.core.json.JsonObject> rxParseCredentials(RoutingContext context)
context
- the routing contextpublic void authorize(User user, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
authorize
in interface AuthHandler
user
- a user.handler
- the handler for the result.@Deprecated public rx.Observable<Void> authorizeObservable(User user)
rxAuthorize(io.vertx.rxjava.ext.auth.User)
insteaduser
- a user.public rx.Single<Void> rxAuthorize(User user)
user
- a user.public static JWTAuthHandler create(JWTAuth authProvider)
authProvider
- the auth provider to usepublic static JWTAuthHandler create(JWTAuth authProvider, String skip)
authProvider
- the auth provider to use.skip
- public JWTAuthHandler setAudience(List<String> audience)
audience
- the audience listpublic JWTAuthHandler setIssuer(String issuer)
issuer
- the issuerpublic JWTAuthHandler setIgnoreExpiration(boolean ignoreExpiration)
ignoreExpiration
- whether expiration is ignoredpublic static JWTAuthHandler newInstance(io.vertx.ext.web.handler.JWTAuthHandler arg)
Copyright © 2021 Eclipse. All rights reserved.