473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Extending IIdentity help

Hi,

I'm attempting to extend IIdentity to enable me to have more
information on the user (email etc) and store it in a cookie. I assume
I am extending the correct object (but if not shout up).

Anyhow I've had a good stab at this, but I don't appear to get my
extended identity back out of the cookie.

At present I'm creating a FormsAuthenticationTicket by decrypting the
cookie and then applying FormsIdentity(ticket) in an attempt to get the
identity. I can't cast this back to my extended identity (only
IIdentity).

I know I'm going wrong. Has anyone a really good example of extending
IIdentity, storing in cookies, retrieving the principal and sending to
the webapp so it can use the user data.

Help as always really appreciated.

Thanks.

Jul 19 '06 #1
2 3566
Spondishy,
Here is an article that shows how I built a custom Principal class for use
with Windows Forms Authentication and SQLITE database:

http://www.eggheadcafe.com/articles/20041009.asp

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Spondishy" wrote:
Hi,

I'm attempting to extend IIdentity to enable me to have more
information on the user (email etc) and store it in a cookie. I assume
I am extending the correct object (but if not shout up).

Anyhow I've had a good stab at this, but I don't appear to get my
extended identity back out of the cookie.

At present I'm creating a FormsAuthenticationTicket by decrypting the
cookie and then applying FormsIdentity(ticket) in an attempt to get the
identity. I can't cast this back to my extended identity (only
IIdentity).

I know I'm going wrong. Has anyone a really good example of extending
IIdentity, storing in cookies, retrieving the principal and sending to
the webapp so it can use the user data.

Help as always really appreciated.

Thanks.

Jul 19 '06 #2

Peter wrote:
Spondishy,
Here is an article that shows how I built a custom Principal class for use
with Windows Forms Authentication and SQLITE database:

http://www.eggheadcafe.com/articles/20041009.asp

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Spondishy" wrote:
Hi,

I'm attempting to extend IIdentity to enable me to have more
information on the user (email etc) and store it in a cookie. I assume
I am extending the correct object (but if not shout up).

Anyhow I've had a good stab at this, but I don't appear to get my
extended identity back out of the cookie.

At present I'm creating a FormsAuthenticationTicket by decrypting the
cookie and then applying FormsIdentity(ticket) in an attempt to get the
identity. I can't cast this back to my extended identity (only
IIdentity).

I know I'm going wrong. Has anyone a really good example of extending
IIdentity, storing in cookies, retrieving the principal and sending to
the webapp so it can use the user data.

Help as always really appreciated.

Thanks.
Thanks Peter,

So, do I take it that IPrincipal is the way to go instead of
IPrincipal?

Jul 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alicia Haumann | last post by:
I accidentally sent this to webmaster@python.org, so this could be a duplicate if "webmaster" forwards it to this list. :{ Hi, there. Thanks for any help that can be offered. I've been...
4
by: Matt | last post by:
Hi, I've been thinking about how to do this, but can't think of a solution. I have a class that is derived from System.Web.UI.WebControls.DataGrid which works a treat, but I'd like to extend...
3
by: Flip | last post by:
I'm looking at the O'Reilly Programming C# book and I have a question about extending and combining interfaces syntax. It just looks a bit odd to me, the two syntaxes look identical, but how does...
6
by: Tim Mulholland | last post by:
I have created my own IIdentity class (actually inherited from GenericIdentity) to contain lots of extra useful information to be passed around with the user's basic information. The class...
6
by: Craig Buchanan | last post by:
I have an object, named SiteIdentity, that implements IIdentity. I have added additional properties to this class, Email for instance. I am using forms authentication. In the code behind class...
2
by: Mark | last post by:
We'd like to capture the windows account of the current web user. In our code-behinds, this is cake using: System.Security.Principal.IIdentity ii = User.Identity; Reponse.Write("User: " +...
1
by: Amar | last post by:
I have a created 2 single signon projects that works fine, by using IIdentity, my stupid question is that how do i clear the User object. After the user navigates through the sites by clicking...
5
by: vbgunz | last post by:
Hello everyone. I own two books. Learning Python and Python in a nutshell. When cross referencing the two books to try and clarify the ideas behind extending methods and delegates, this is where...
3
by: katis | last post by:
Hi all :) Is it posible in xsd to change only minOccurs value of element in complex type by extending this type? The problem I'm trying to solve is this: I have two complex types -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.