custom intercept development

Ryan Suarez ryan.suarez at
Thu Oct 3 16:13:40 EDT 2019


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?


    <view-state id="secondView" view="#{}-secondView">
            <evaluate expression="T(org.slf4j.LoggerFactory).getLogger('net.shibboleth.idp').info('Im in the second view')" />
            <evaluate expression="environment" result="viewScope.environment" />
            <evaluate expression="T(" result="viewScope.encoder" />
            <evaluate expression="flowRequestContext.getExternalContext().getNativeRequest()" result="viewScope.request" />
            <evaluate expression="flowRequestContext.getExternalContext().getNativeResponse()" result="viewScope.response" />
            <evaluate expression="MyIntercept" />


    <bean id="MyIntercept"
        class="net.myOrg.MyIntercept" scope="prototype" />

package net.myOrg;

import net.shibboleth.idp.profile.context.ProfileInterceptorContext;
import org.opensaml.profile.context.ProfileRequestContext;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MyIntercept {

    /** Class logger. */
    Logger log = LoggerFactory.getLogger("net.shibboleth.idp");

    protected void doExecute(final ProfileRequestContext profileRequestContext,
            final ProfileInterceptorContext interceptorContext) {"Hello World");


# javac -cp "./jars/*"
# mv MyIntercept.class net/myOrg/
# jar -cvf myOrg-0.3.jar net
added manifest
adding: net/(in = 0) (out= 0)(stored 0%)
adding: net/myOrg/(in = 0) (out= 0)(stored 0%)
adding: net/myOrg/MyIntercept.class(in = 680) (out= 433)(deflated 36%)

# cp myOrg-0.3.jar /opt/shibboleth-idp/edit-webapp/WEB-INF/lib/
# /opt/shibboleth-idp/bin/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list