microsoft.public.sqlserver.notificationsvcs
[Top] [All Lists]

Re: Subscription Management

Subject: Re: Subscription Management
From: "Shyam Pather [MSFT]"
Date: Wed, 22 Jun 2005 09:29:52 -0700
Newsgroups: microsoft.public.sqlserver.notificationsvcs
Hello,
The SQL-NS APIs for subscription management are designed to work with any 
login/authentication system. Many web sites use forms authentication to 
manage user accounts, but Windows authentication is also sometime used. It's 
unlikely that you'll want your web site users to be SQL users, unless your 
application is designed strictly for internal use within your organization.

SQL-NS makes no assumptions about the authentication system you're using. 
It's up to you to build the general framework for handling user accounts and 
logins. Once a user has logged in, you should use the SQL-NS APIs to access 
only the subscriptions that user can see.

This means you have to have a mapping between the user id of the user logged 
in, and the subscriber ids in the NS application that they're allowed to 
manage. Typically, this is a 1:1 mapping - the user only gets to see his or 
her own subscriptions. In the case of superusers, this is obviously a 
1-to-many mapping. How you maintain/store the mapping is again up to you: 
SQL-NS neither offers nor restricts anything here. In forms-authentication 
applications, typically the user id is the same as the subscriber id.

Once you know the subscriberId(s) that the logged on user is allowed to 
manage, you can simply use the Subscriber and Subscription classes in the NS 
API to access the subscriber and subscription data. For example, you can 
obtain a SubscriberEnumeration from the NSInstance object and use that to 
obtain the Subscriber object for a given SubscriberId. You can then use this 
Subscriber object to access the subscriptions for that subscriber.

Hope this helps. If you have my book (link below), Chapter 7 covers all of 
this in more detail
-shyam

-- 
Learn more about SQL-NS: 
http://www.amazon.com/exec/obidos/tg/detail/-/0672326647/
---------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights. 
Use of included script samples are subject to the terms specified at 
http://www.microsoft.com/info/cpyright.htm.
---------------------------------------------
"RDV" <[email protected]> wrote in message 
news:[email protected]
>I would like to have users login to the subscription management
> application.  In general, each user would only have the ability to
> manage subscriptions for themselves.  There would also be a list of
> super users who could enter subscriptions for all users.
>
> What are some strategies for user login and management for
> subscriptions?
>
> Can you use SQL logins?  Can you use Windows logins?
>
> In your experiences what has worked best?
> 



<Prev in Thread] Current Thread [Next in Thread>