PostAuthenticationFlows for non-SAML profiles

Rod Widdowson rdw at steadingsoftware.com
Mon Aug 24 06:15:52 EDT 2015


> <evaluate
> expression="SetRPUIInformation.getRPUIContextCreateStrategy().apply(op
> ensa
> mlProfileRequestContext)" result="viewScope.rpUIContext" />

AFAICS this is doing this because at that stage there isn’t a guarantee
authnContext.  If you look at the password flow it just picks it up as a
child of the authnContext

> So in my own flow where that context is prepped, I'd have do something
> like:
> 
> SAMLPeerEntityContext samlPeerEntityContext =
> profileRequestContext.getOutboundMessageContext().getSubcontext(SAM
> LPeerEn
> tityContext.class, true);
> 
> SAMLMetadataContext mdCtx = new SAMLMetadataContext();
> mdCtx.setEntityDescriptor(...);

Yup.  That’s what I would do

 
> RelyingPartyUIContext rpUI = new RelyingPartyUIContext();
> rpUI.setRPEntityDescriptor(...);
> mdCtx.addSubcontext(rpUI);
> 
> samlPeerEntityContext.addSubcontext(mdCtx);

I don't think so.  Once the EntityDescriptor is in the right place you just
need to call SetRPUIInformation which will do all the work for you.  

> For one, my outbound context isn't rightly initialized.

If you needed to you can always overload
SetRPUIInformation#metadataContextLookupStrategy to look for the metadata
context where you want to keep it.  At that stage you could do away with the
SAMLPeerEntityContext as well.  I'm not deeply enough into the flows to know
whether I am uncomfortable with that or not, but for a proof of concept I'd
say that that’s what these setters are for.

I'd probably put the populating for the SAMLMetadataContext into its own
action so you can move it about the context tree as things develop.





More information about the dev mailing list