public class ServiceJWTInterceptor extends Object implements Function<io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject>,io.vertx.core.Future<io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject>>>
Constructor and Description |
---|
ServiceJWTInterceptor() |
Modifier and Type | Method and Description |
---|---|
ServiceJWTInterceptor |
addAuthority(String authority)
Add a single authority to the authorities set.
|
io.vertx.core.Future<io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject>> |
apply(io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject> msg) |
ServiceJWTInterceptor |
clearAuthorities()
Clear the current set of authorities.
|
ServiceJWTInterceptor |
setAuthorities(Set<String> authorities)
Set the required authorities for the service, once a JWT is validated it will be
queried for these authorities.
|
ServiceJWTInterceptor |
setJwtAuth(io.vertx.ext.auth.jwt.JWTAuth jwtAuth)
Set a JWT auth that will verify all requests before the service is invoked.
|
public ServiceJWTInterceptor setJwtAuth(io.vertx.ext.auth.jwt.JWTAuth jwtAuth)
jwtAuth
- a JWT authpublic ServiceJWTInterceptor setAuthorities(Set<String> authorities)
authorities
- set of authoritiespublic ServiceJWTInterceptor addAuthority(String authority)
authority
- authoritypublic ServiceJWTInterceptor clearAuthorities()
public io.vertx.core.Future<io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject>> apply(io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject> msg)
Copyright © 2018 Eclipse. All rights reserved.