acs - Detect original relaying party application -



acs - Detect original relaying party application -

i want authenticate user rp1 , rp2 applications against acs , custom sts provider. need know application rp1 or rp2 user came from. possible , how it?

i think trivial without using acs how acs.

in federation chain, sts theoretically aware of neighbors (in case, idp aware of acs) , hence can't this. officially supported way able register same physical sts 2 different logical identity providers in acs (e.g. http://myidp.com/rp1 , http://myidp.com/rp2).

in practice, however, can way, though manner officially unsupported. next assumes you're using ws-federation custom idp, though can similar other protocols well. acs encodes info original request, including realm , reply addresses, encoded using base64urlencoding in wctx parameter of ws-federation response. can decode context in next manner:

signinrequestmessage message = wsfederationmessage.createfromuri(request.url); byte[] bytes = httpserverutility.urltokendecode(message.context); string decodedcontext = utf8encoding.utf8.getstring(bytes);

this give set of name/value pairs, 2 of rm=<realm>&ry=<reply>, realm , reply addresses of original rp.

as mentioned above, though, beware not officially supported , format of context string may alter in future.

acs

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -