custom interceptor, where to put java code?

Cantor, Scott cantor.2 at osu.edu
Mon Feb 4 09:01:41 EST 2019


On 2/3/19, 11:37 AM, "users on behalf of Pablo Vidaurri" <users-bounces at shibboleth.net on behalf of psvidaurri at gmail.com> wrote:

> 1) in edit-webapp, can I just create a src folder to put in the java?

No. You build a jar, drop it in edit-webapp/WEB-INF/lib, and run the build.sh script to rebuild the war file.

> 3) How do I define the flows/intercept/customcheck/customcheck-beans.xml to call MyCustomCheck.doSomeCheck()
> and pass the returned boolean value to my customcheck-flow.xml to process the decision-state block?

>        <if test="ContextCheckPredicate.apply(opensamlProfileRequestContext)"  <-- how to test the return value from my java class?

That is how, depending on whatever it is you're trying to do. You seem to be copying code from somewhere else, but in the code you copied it from, ContextCheckPredicate is the name of a Spring bean implementing the Guava Predicate interface, and that expression calls the predicate and applies the result to determine the if/then branch to take. opensamlProfileRequestContext is a shorthand variable that's populated by a low level utility class with the root of the "state" tree of objects tracking what's going on in the request.
 
> Sorry, but it is not obvious to me how to implement this type of check. Maybe it's my lack of experience with SWF.

I'm sure that's true, but nothing is going to magically impart that knowledge, you have to read the SWF docs, read the code, and spend the time.
 
-- Scott




More information about the users mailing list