Hello team,
Im trying to navigate to another view after onAuthChallengeCompleted event script to but its not working for me.
Anyone can help me on that?
First thing's first - learn to post code snippets.
Secondly, onAuthChallengeCompleted event runs in the gateway scope but you're trying to access it via a function in the session scope. You'd need to implement the session ID in your script.
Hi @Fran_Dujmovic,
Thanks for suggestion, I have tried to implement session Id but I'm getting error:
Channel is not set.
I have attached code:
def onAuthChallengeCompleted(session, payload, result):
if result.isSuccess():
# Parse information about the successful result
success = True
context = result.getAsSuccess().getContext()
user = context.user
roles = user.roles
AllSession= system.perspective.getSessionInfo()
for user_session in AllSession:
if user_session.id==session.props.id:
page_ids=user_session.pageIds
for page_id in page_ids:
logger = system.util.getLogger("Authentication Challenge-Roles")
logger.info("%s is session_id"% user_session.id)
logger = system.util.getLogger("Authentication Challenge-Pageid")
logger.info("%s is page_id"% page_id)
system.perspective.navigate(view='User Management/RoleConfiguration',sessionId=user_session.id,pageId=page_id)
Please help me to implement session id?
First, we can start by changing
AllSession= system.perspective.getSessionInfo()
to just use the session
parameter that's already provided for you in the function.
Are you actually trying to redirect every tab a person may have open to the User Management/RoleConfiguration view after a successful authentication? Seems a little bit odd, but this could be a customer requirement.
Here is a very helpful docs page that goes into this a little bit.
Hello @YF129701 ,
Yes, after successes full authentication user will navigate to respective screen. But currently im unable to navigate due to facing error
Can you post a screenshot of the error you're facing?