<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="text-align: left; direction: ltr; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div>Greetings,</div>
<div><br>
</div>
<div>I apologize in advance as I'm not a java developer. I'm trying to create a custom interceptor in the post-authentication flow by copying the existing attribute-release intercept. At this stage I'm just trying to print debugging logs. I can see the on-entry/"I'm
in the second view" log from the flow, but I don't see the "Hello World" log from the class file. Any pointers?</div>
<div><br>
</div>
<div>/opt/shibboleth-idp/flows/intercept/myIntercept/myIntercept-flow.xml:</div>
<div><br>
</div>
<div> <view-state id="secondView" view="#{flowRequestContext.activeFlow.id}-secondView"></div>
<div> <on-entry> </div>
<div> <evaluate expression="T(org.slf4j.LoggerFactory).getLogger('net.shibboleth.idp').info('Im in the second view')" /> </div>
<div> </on-entry> </div>
<div> <on-render></div>
<div> <evaluate expression="environment" result="viewScope.environment" /></div>
<div> <evaluate expression="T(net.shibboleth.utilities.java.support.codec.HTMLEncoder)" result="viewScope.encoder" /></div>
<div> <evaluate expression="flowRequestContext.getExternalContext().getNativeRequest()" result="viewScope.request" /></div>
<div> <evaluate expression="flowRequestContext.getExternalContext().getNativeResponse()" result="viewScope.response" /></div>
<div> <evaluate expression="<b>MyIntercept</b>" /></div>
<div> </on-render></div>
<div> </view-state></div>
<div><br>
</div>
<div>/opt/shibboleth-idp/flows/intercept/myIntercept/myIntercept-beans.xml:</div>
<div><br>
</div>
<div> <bean id="MyIntercept"</div>
<div> class="net.myOrg.MyIntercept" scope="prototype" /></div>
<div><br>
</div>
<div>MyIntercept.java:</div>
<div><br>
</div>
<div style="margin-left: 3ch;">
<div>package net.myOrg;</div>
<div><br>
</div>
<div>import net.shibboleth.idp.profile.context.ProfileInterceptorContext;</div>
<div>import org.opensaml.profile.context.ProfileRequestContext;</div>
<div><br>
</div>
<div>import org.slf4j.Logger;</div>
<div>import org.slf4j.LoggerFactory;</div>
<div><br>
</div>
<div>public class MyIntercept {</div>
<div><br>
</div>
<div> /** Class logger. */</div>
<div> Logger log = LoggerFactory.getLogger("net.shibboleth.idp");</div>
<div><br>
</div>
<div> protected void doExecute(final ProfileRequestContext profileRequestContext,</div>
<div> final ProfileInterceptorContext interceptorContext) {</div>
<div><br>
</div>
<div> <b> log.info("Hello World");</b></div>
<div><br>
</div>
<div> }</div>
<div>}</div>
<div><br>
</div>
</div>
<div># javac -cp "./jars/*" MyIntercept.java</div>
<div># mv MyIntercept.class net/myOrg/</div>
<div># jar -cvf myOrg-0.3.jar net</div>
<div style="margin-left: 3ch;">
<div>added manifest</div>
<div>adding: net/(in = 0) (out= 0)(stored 0%)</div>
<div>adding: net/myOrg/(in = 0) (out= 0)(stored 0%)</div>
</div>
<div style="margin-left: 3ch;">
<div>adding: net/myOrg/MyIntercept.class(in = 680) (out= 433)(deflated 36%)</div>
</div>
<div><br>
</div>
<div># cp myOrg-0.3.jar /opt/shibboleth-idp/edit-webapp/WEB-INF/lib/</div>
<div># /opt/shibboleth-idp/bin/build.sh</div>
<div><br>
</div>
<div>regards,</div>
<div>Ryan</div>
<div></div>
<div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div>
<div></div>
<div></div>
</div>
<div></div>
</body>
</html>