Re: Custom authorization plug-in
- From: "Vladimir Polischuk" <vlad_at_voynex.com>
- Date: Tue, 2 Jun 2009 17:50:24 +0300
Hi,
We have the same issue with Windows Server 2008. I haven't had a time to
look into MSDN WMS SDK documentation deeply yet but I think here is a need
to implement some authorization interfaces also to just disconnect the user.
Guess there is a need to read more on WMS authentication plug-ins in general
and on WMS Negotiate Authentication plug-in specifically.
Regards,
Vladimir V. Polischuk
IT Manager
www.voynex.com - custom software development, solutions for Windows Media
(pay-per-minute billing, streaming content protection, access control)
<loke.dupont@xxxxxxxxx> wrote in message
news:d0a8bc82-6bdb-4336-a752-007a63a07560@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I've created a custom authorization plug-in in C# based on the msdn
articles. However, i find that if WMS Negotiate Authentication is
enabled on the server (even if not enabled on the publishing point),
it will ask for username and password when i deny authorization. This
does not happen with the "WMS IP Address Authorization" plug-in that
comes with Windows Media Services. I'm testing this on Windows Media
Services on Server 2008. Is there any way to get my plugin to act like
WMS IP Address Authorization and disconnect instead of try negoitate
authentication on failed authorization.
My AuthorizeEvent looks like this:
void IWMSEventAuthorizationPlugin.AuthorizeEvent(ref WMS_EVENT pEvent,
IWMSContext pUserCtx, IWMSContext pPresentationCtx, IWMSCommandContext
pCommandCtx, IWMSEventAuthorizationCallback pCallback, object Context)
{
// This variable is used to represent HRESULT error codes.
int hr = 0;
// Get ip address
string user_ip_address = null;
pUserCtx.GetStringValue
(WMSDefines.WMS_USER_IP_ADDRESS_STRING,
WMSDefines.WMS_USER_IP_ADDRESS_STRING_ID, out user_ip_address, 0);
try
{
// Check to see whether read access is permitted.
if (user_ip_address != "93.163.17.146")
{
// User was denied read access.
// Pass the callback method the integer
// value of E_ACCESSDENIED.
hr = unchecked((int)0x80070005);
}
}
catch (Exception)
{
// TODO: Handle exceptions.
}
finally
{
// Report the results of the authorization
// challenge back to the server.
pCallback.OnAuthorizeEvent(hr, Context);
}
}
.
- Follow-Ups:
- Re: Custom authorization plug-in
- From: loke . dupont
- Re: Custom authorization plug-in
- References:
- Custom authorization plug-in
- From: loke . dupont
- Custom authorization plug-in
- Prev by Date: Custom authorization plug-in
- Next by Date: Re: live stream through media server is pretty delayed, how can i reduce it?
- Previous by thread: Custom authorization plug-in
- Next by thread: Re: Custom authorization plug-in
- Index(es):
Relevant Pages
|