Authorization plugin: URL referer retrieving problem

Hello all.

I am currently developping an authorization plugin.
The authorization is based on the URL referer.

In a few words, I would like to retrieve the client URL referer (if
available), and compare it to a list of referers authorized to access
to the content of my publication point.

In the AuthorizeEvent interface implementation, I combine the
UserContext and the GetStringValue method to retrieve the URL Referer:

string l__URLRefererString= string.Empty;
io__UserContext.GetStringValue
(
WMSDefines.WMS_USER_REFERER,
WMSDefines.WMS_USER_REFERER_ID,
out l__URLRefererString,
0
);

However, il still get the same problem, this method throws the
following exception:
Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

Although the following code worked perfectly

string l__UserIPAddress = string.Empty;
io__UserContext.GetStringValue
(
WMSDefines.WMS_USER_IP_ADDRESS_STRING,
WMSDefines.WMS_USER_IP_ADDRESS_STRING_ID,
out l__UserIPAddress,
0
);

It seems that the value of WMS_USER_REFERER is not included in the User
Context, but the documentation indicates the opposite.
I tested to read my stream publication point via my Windows media
player. This gave me no URL referer (pretty normal in this case)
But I also tested to read my stream publication point via an embed
Windows media player object in HTML page. The result was the same.

Is there anyone who encountered such trouble
To Summarize, how can retrieve the URL referer from my AuthorizeEvent
interface implementation

Thanks in advance.

Jordan


Answer this question

Authorization plugin: URL referer retrieving problem