January 21, 2019 at 2:01 pm #24520
I have created an authentication tree with a username and password collector nodes with a scripted authentication node (Groovy) at the end of it.
In the script, accessing username as sharedState.get(‘username’) works fine but accessing password as sharedState.get(‘password’) results in an error.
Please can you advise?January 21, 2019 at 3:05 pm #24521James PhillpottsModerator
You don’t specify which version of AM you are using, but in AM6+ the password is in the
transientStateobject rather than the
sharedState, and is only available during the request in which it was submitted from the user agent. However, the
transientStateis not currently available from a scripted node (it has been raised as an improvement request, but we have not had a chance to add it yet), so you will need to implement a Java node rather than a script.
JamesJanuary 21, 2019 at 5:01 pm #24522
Thanks James for clarification,
I am using AM 6.5.
The objective is to collect a username and password and validate it against an Oracle database table.
I have previously used the JDBC authentication module but couldn’t find a node that will do something similar.
I went for a scripted node to try reduce the time, as creating a custom node would have taken longer for me.
Are you aware of any JDBC authentication node created by community or ForgeRock please?January 22, 2019 at 10:35 pm #24546Peter MajorModerator
The transient state is not currently available to scripted nodes, see:
https://bugster.forgerock.org/jira/browse/OPENAM-13217June 25, 2019 at 3:08 am #25979AndrewParticipant
AM 6.5.1 works for accessing the password from transientState in a Scripted Auth Node.
var sharedpassword= transientState.get(“password”);June 26, 2019 at 5:14 pm #25990
Thanks, Peter and Andrew
You must be logged in to reply to this topic.