use of org.apache.shiro.authz.aop.PermissionAnnotationMethodInterceptor in project perry by ca-cwds.
the class TestModule method configure.
@Override
protected void configure() {
bind(TestService.class).to(TestServiceImpl.class);
install(new SecurityModule(null).addAuthorizer("case:read", CaseAuthorizer.class).addStaticAuthorizer(TestStaticAuthorizer.class));
bindInterceptor(Matchers.any(), Matchers.any(), new MethodInterceptor() {
PermissionAnnotationMethodInterceptor permissionAnnotationMethodInterceptor = new PermissionAnnotationMethodInterceptor();
@Override
public Object invoke(MethodInvocation invocation) throws Throwable {
return permissionAnnotationMethodInterceptor.invoke(new org.apache.shiro.aop.MethodInvocation() {
@Override
public Object proceed() throws Throwable {
return invocation.proceed();
}
@Override
public Method getMethod() {
return invocation.getMethod();
}
@Override
public Object[] getArguments() {
return invocation.getArguments();
}
@Override
public Object getThis() {
return invocation.getThis();
}
});
}
});
}
Aggregations