public class ServiceAuthInterceptor extends Object implements java.util.function.Function<Message<JsonObject>,Future<Message<JsonObject>>>
Constructor and Description |
---|
ServiceAuthInterceptor() |
Modifier and Type | Method and Description |
---|---|
ServiceAuthInterceptor |
addAuthorization(Authorization authorization)
Add a single authority to the authorities set.
|
Future<Message<JsonObject>> |
apply(Message<JsonObject> msg) |
ServiceAuthInterceptor |
setAuthenticationProvider(AuthenticationProvider provider)
Set an authentication provider that will verify all requests before the service is invoked.
|
ServiceAuthInterceptor |
setAuthorizationProvider(AuthorizationProvider provider) |
ServiceAuthInterceptor |
setAuthorizations(Set<Authorization> authorizations)
Set the required authorities for the service, once a JWT is validated it will be
queried for these authorities.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, compose, identity
public ServiceAuthInterceptor setAuthenticationProvider(AuthenticationProvider provider)
provider
- an authentication providerpublic ServiceAuthInterceptor setAuthorizationProvider(AuthorizationProvider provider)
public ServiceAuthInterceptor setAuthorizations(Set<Authorization> authorizations)
authorizations
- set of authoritiespublic ServiceAuthInterceptor addAuthorization(Authorization authorization)
authorization
- authoritypublic Future<Message<JsonObject>> apply(Message<JsonObject> msg)
apply
in interface java.util.function.Function<Message<JsonObject>,Future<Message<JsonObject>>>
Copyright © 2021 Eclipse. All rights reserved.