<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>Good news I think I'm done with the security module, finally. But there is one last thing that is bothering me. Maybe someone has a solution I didn't think of.</div><div><br></div><div>Like I've explained before I have a 2 SecurityInterceptors one on the client and one on the server. With the client security interceptor I check the servers state and 'redirect' the user to the login page if he is not logged in. Because the client can be manipulated there is also a server side interceptor that will throw a exception if the user is not logged in.</div><div><br></div><div>This is all very nice and all a user will have to do is annotate the methods. I use the same annotation for both the client and the server side interceptor, but I have to annotate the remote interface and the service implementation e.g.</div><div><br></div><div><pre class="line-pre" style="font-size: 12px; line-height: 16px; font-family: Consolas, 'Liberation Mono', Courier, monospace; word-wrap: break-word; width: 744px; margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: rgb(255, 255, 255); position: static; z-index: auto; "><div class="line" id="file-service-java-LC1"><span class="nd">@Remote</span></div><div class="line" id="file-service-java-LC2"><span class="kd" style="font-weight: bold;">public</span> <span class="kd" style="font-weight: bold;">interface</span> <span class="nc" style="color: rgb(68, 85, 136); font-weight: bold;">MessageService</span> <span class="o" style="font-weight: bold;">{</span></div><div class="line" id="file-service-java-LC3">  <span class="nd">@RequireAuthentication</span></div><div class="line" id="file-service-java-LC4">  <span class="n" style="color: rgb(51, 51, 51);">String</span> <span class="nf" style="color: rgb(153, 0, 0); font-weight: bold;">hello</span><span class="o" style="font-weight: bold;">();</span></div><div class="line" id="file-service-java-LC5">&nbsp;</div><div class="line" id="file-service-java-LC6">  <span class="nd">@RequireRoles</span><span class="o" style="font-weight: bold;">(</span><span class="s" style="color: rgb(221, 17, 68);">"admin"</span><span class="o" style="font-weight: bold;">)</span></div><div class="line" id="file-service-java-LC7">  <span class="n" style="color: rgb(51, 51, 51);">String</span> <span class="nf" style="color: rgb(153, 0, 0); font-weight: bold;">ping</span><span class="o" style="font-weight: bold;">();</span></div><div class="line" id="file-service-java-LC8"><span class="o" style="font-weight: bold;">}</span></div></pre><div><br></div></div><div><pre class="line-pre" style="font-size: 12px; line-height: 16px; font-family: Consolas, 'Liberation Mono', Courier, monospace; word-wrap: break-word; width: 744px; margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: rgb(255, 255, 255); position: static; z-index: auto; "><div class="line" id="file-impl-java-LC1"><span class="nd">@Service</span></div><div class="line" id="file-impl-java-LC2"><span class="kd" style="font-weight: bold;">public</span> <span class="kd" style="font-weight: bold;">class</span> <span class="nc" style="color: rgb(68, 85, 136); font-weight: bold;">MessageServiceImpl</span> <span class="kd" style="font-weight: bold;">implements</span> <span class="n" style="color: rgb(51, 51, 51);">MessageService</span> <span class="o" style="font-weight: bold;">{</span></div><div class="line" id="file-impl-java-LC3">  <span class="nd">@Inject</span></div><div class="line" id="file-impl-java-LC4">  <span class="n" style="color: rgb(51, 51, 51);">AuthenticationService</span> <span class="n" style="color: rgb(51, 51, 51);">authenticationService</span><span class="o" style="font-weight: bold;">;</span></div><div class="line" id="file-impl-java-LC5">&nbsp;</div><div class="line" id="file-impl-java-LC6">  <span class="nd">@Override</span></div><div class="line" id="file-impl-java-LC7">  <span class="nd">@RequireAuthentication</span></div><div class="line" id="file-impl-java-LC8">  <span class="kd" style="font-weight: bold;">public</span> <span class="n" style="color: rgb(51, 51, 51);">String</span> <span class="nf" style="color: rgb(153, 0, 0); font-weight: bold;">hello</span><span class="o" style="font-weight: bold;">()</span> <span class="o" style="font-weight: bold;">{</span></div></pre><div><br></div></div><div><br></div><div>What I don't like is that the user will need to keep these to in sync, do you guys have an idea to have only one of these but still have both of the interceptors triggered?</div><div><br></div><div>Cheers,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Erik Jan</div><div><br></div></body></html>