Tagged: AM6.5, sharedState
This topic has 5 replies, 4 voices, and was last updated 3 years, 1 month ago by AJAY SURI.
-
AuthorPosts
-
January 21, 2019 at 2:01 pm #24520
AJAY SURI
ParticipantHi All
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 Phillpotts
ModeratorHi Ajay,
You don’t specify which version of AM you are using, but in AM6+ the password is in the
transientState
object rather than thesharedState
, and is only available during the request in which it was submitted from the user agent. However, thetransientState
is 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.Cheers
JamesJanuary 21, 2019 at 5:01 pm #24522AJAY SURI
ParticipantThanks 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 Major
ModeratorThe transient state is not currently available to scripted nodes, see:
https://bugster.forgerock.org/jira/browse/OPENAM-13217June 25, 2019 at 3:08 am #25979Andrew
ParticipantAM 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 #25990AJAY SURI
ParticipantThanks, Peter and Andrew
-
AuthorPosts
You must be logged in to reply to this topic.