vertx / io.vertx.serviceproxy / ServiceJWTInterceptor

# ServiceJWTInterceptor

`open class ServiceJWTInterceptor : Function<Message<JsonObject>, Future<Message<JsonObject>>>`

Create an event bus service interceptor using a JWT auth that will verify all requests before the service is invoked Once a JWT is validated it will be queried for authorities. If authorities are missing a error 403 is returned.

### Constructors

<init> | `ServiceJWTInterceptor()` Create an event bus service interceptor using a JWT auth that will verify all requests before the service is invoked Once a JWT is validated it will be queried for authorities. If authorities are missing a error 403 is returned.

### Functions

addAuthority | `open fun addAuthority(authority: String): ServiceJWTInterceptor` Add a single authority to the authorities set.
apply | `open fun apply(msg: Message<JsonObject>): Future<Message<JsonObject>>`
clearAuthorities | `open fun clearAuthorities(): ServiceJWTInterceptor` Clear the current set of authorities.
setAuthorities | `open fun setAuthorities(authorities: MutableSet<String>): ServiceJWTInterceptor` Set the required authorities for the service, once a JWT is validated it will be queried for these authorities. If authorities are missing a error 403 is returned.
setJwtAuth | `open fun setJwtAuth(jwtAuth: JWTAuth): ServiceJWTInterceptor` Set a JWT auth that will verify all requests before the service is invoked.