![JAR search and dependency download from the Maven repository](/logo.png)
net.redpipe.engine.security.VertxUserAnnotationHandler Maven / Gradle / Ivy
package net.redpipe.engine.security;
import java.lang.annotation.Annotation;
import io.reactivex.Single;
import io.vertx.reactivex.ext.auth.User;
public class VertxUserAnnotationHandler extends AuthorizingAnnotationHandler {
@Override
public Single assertAuthorized(Annotation authzSpec) {
if(authzSpec instanceof RequiresUser){
User user = getUser();
if(user == null)
return Single.error(new AuthenticationException("User required"));
}
return Single.just(true);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy