ECMA to access SubjectCanonicalizationContext in Resolver
Michael A Grady
mgrady at unicon.net
Tue Nov 10 12:05:11 EST 2015
Based on the conversation on Shib Users, I've been trying to put an attribute definition in the resolver to access the underlying username the user entered at login. I started with the pretty simple one liner that Scott had suggested, but keep getting "null" returned from trying to bring in the SubjectCanonicalizationContext. At the moment, I've expanded to the following:
subjectP = Java.type("javax.security.auth.Subject");
subjectContext = profileContext.getSubcontext(
"net.shibboleth.idp.authn.context.SubjectCanonicalizationContext");
subjectP = subjectContext.getSubject();
but keep getting:
Caused by: javax.script.ScriptException: TypeError: null has no such function "getSubject" in <eval> at line number 13
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:455)
Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: null has no such function "getSubject"
I'm sure I must be missing some obvious piece, but I can't figure out what.
--
Michael A. Grady
IAM Architect, Unicon, Inc.
More information about the dev
mailing list