Hi Sameera et al. Thanks for the information Sameera. Anyway is there any specific reason for missing relay state in client when IDP is requested for that. Actually my problem was, when logging to store application, IDP sends a SAML request with relay state that is missing in store application. but when I change the store url to http://localhost:9763/store, I can access the store page successfully. Anyway if this relay state is optional can I ignore it?
Thanks On Sat, Nov 8, 2014 at 6:13 PM, Sameera Medagammaddegedara < [email protected]> wrote: > Adding Dulanja. > > The relay state value is an arbitrary string that is provided to an IDP in > a SAML request that is handed back to the client.It is optional and only > guaranteed to be sent back by the IDP if single logout is enabled. > > The relay state value should be sent by the APIM apps when initiating SSO > login. > > Thank You, > Sameera > > On Fri, Nov 7, 2014 at 6:25 PM, Lakshman Udayakantha <[email protected]> > wrote: > >> Hi All, >> >> There is a map called relayStateMap in SAMLSSORelyingPartyObject class. >> This map holds some random strings against URI values. When i want to log >> into APIM store or publisher it checks these random values with URI values. >> If there is no URI for that requested relayState(random String value) APIM >> will throw an error. below is the code that error throw >> >> // relay state value should be a valid value, this value is mapped with >> request uri. >> var relayState = request.getParameter("RelayState"); >> >> var requestedURI = ssoRelyingParty.getRelayStateProperty(relayState); >> if( requestedURI==null){ >> log.error("Relaystate value is invalid."); >> response.sendRedirect("../error.jag"); >> return; >> } >> >> below is the getRelayStateProperty method in SAMLSSORelyingPartyObject >> class. >> >> public static String jsFunction_getRelayStateProperty(Context cx, >> Scriptable thisObj, >> Object[] args, >> Function funObj) >> throws ScriptException { >> int argLength = args.length; >> if (argLength != 1 || !(args[0] instanceof String)) { >> String errorMsg = "Invalid argument. Relay state value is >> missing."; >> log.error(errorMsg); >> } >> String requestedURI = relayStateMap.get((String) args[0]); >> relayStateMap.remove((String) args[0]); >> >> return requestedURI; >> >> } >> >> I can't understand why request.getParameter("RelayState") returns a >> value that no URI is in relayStateMap. can someone help me to understand >> this scenario? >> -- >> Lakshman Udayakantha >> WSO2 Inc. www.wso2.com >> lean.enterprise.middleware >> Mobile: *0711241005* >> >> > > > -- > Sameera Medagammaddegedara > Software Engineer > > Contact: > Email: [email protected] > Mobile: + 94 077 255 3005 > -- Lakshman Udayakantha WSO2 Inc. www.wso2.com lean.enterprise.middleware Mobile: *0711241005*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
