08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 10 ■ .<strong>NET</strong> 3.0: PROGRAMMING WITH CARDSPACE 251<br />

The earlier example used the Claims property to pull the desired claims from the<br />

token <strong>and</strong> set the value of some label controls to their values like this:<br />

Token token= new Token(xmlToken);<br />

givenname.Text = token.Claims[ClaimTypes.GivenName];<br />

surname.Text = token.Claims[ClaimTypes.Surname];<br />

email.Text = token.Claims[ClaimTypes.Email];<br />

Summary<br />

As security is becoming more <strong>and</strong> more of a necessity as opposed to a luxury when dealing<br />

with the <strong>Web</strong>, it is essential to make users’ experiences with security as friendly as<br />

possible, while still protecting them from malicious web sites.<br />

CardSpace fills this void by providing an easy-to-use <strong>and</strong> attractive way of storing<br />

your personal information securely <strong>and</strong> digitally, <strong>and</strong> an easy means to send it to a web<br />

site that requests it. It is designed to be a long-term replacement for passwords, <strong>and</strong> can<br />

effectively form a client-based single sign-on for all of your favorite sites.<br />

In this chapter, you explored CardSpace <strong>and</strong> how it looks from the user’s point of<br />

view. You then went into putting together a development environment where you can<br />

host your own sites that accept CardSpace credentials. As part of this exercise, you looked<br />

briefly at site certificates <strong>and</strong> how they prevent domain spoofing. You then went into the<br />

process of building your own CardSpace-enabled site, looking at how to embed the<br />

CardSpace object on your pages <strong>and</strong> process it, taking user credentials <strong>and</strong> using them to<br />

customize the site for the end user.<br />

Finally, you took a tour of a helper class that is provided by the SDK <strong>and</strong> that implements<br />

the token in an easily manageable way.<br />

I hope this was a good taste of what you can do with CardSpace to make your users’<br />

lives a lot easier. There’s a lot more information that you can drill into—<strong>and</strong> a great<br />

resource for this is the Windows SDK documentation.<br />

In the next chapter, we’ll get back onto the traditional web development route—<br />

looking at the technology that effectively gave birth to <strong>Web</strong> 2.0—Asynchronous JavaScript<br />

<strong>and</strong> XML, also known as Ajax.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!