Intersoft ClientUI Documentation
RequiresAuthentication Property
See Also  Example Send Feedback
Intersoft.Client.UI.Navigation Namespace > UXPage Class : RequiresAuthentication Property






Gets or sets a value indicating whether the page requires the User to be authenticated in order to access the page.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Authentication")>
Public Property RequiresAuthentication As Boolean
Visual Basic (Usage)Copy Code
Dim instance As UXPage
Dim value As Boolean
 
instance.RequiresAuthentication = value
 
value = instance.RequiresAuthentication
C# 
[CategoryAttribute("Authentication")]
public bool RequiresAuthentication {get; set;}
Delphi 
public read-write property RequiresAuthentication: Boolean; 
JScript 
CategoryAttribute("Authentication")
public function get,set RequiresAuthentication : boolean
Managed Extensions for C++ 
[CategoryAttribute("Authentication")]
public: __property bool get_RequiresAuthentication();
public: __property void set_RequiresAuthentication( 
   bool value
);
C++/CLI 
[CategoryAttribute("Authentication")]
public:
property bool RequiresAuthentication {
   bool get();
   void set (    bool value);
}

Example

The following example shows how to setup a UXPage to require user authentication.
XAMLCopy Code
<Intersoft:UXPage 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:Intersoft="http://intersoft.clientui.com/schemas"
        RequiresAuthentication="True"
    ...>

</Intersoft:UXPage>

Remarks

In many line-of-business scenarios, your application may require certain pages to authenticate against the current user. ClientUI navigation framework includes built-in authentication feature which is implemented at the core navigation process in the UXFrame and UXPage class. This ensures high security protection as the authentication process is built into the framework, which eliminate the need of additional workaround or plumbing code.

To implement authentication, you set the User property of the frame to an object that implements IPrincipal interface. Since the User property relies on IPrincipal interface which is implemented in the Silverlight runtime, the authentication feature in ClientUI navigation framework allows you to flexibly use any kind of authentication providers such as WCF Authentication Service, or other third party's authentication services. For scalable authentication implementation that produces consistent result, it is recommended that you use MVVM pattern to maintain the user authentication, which is generally achieved by binding the User property to an authentication context defined in ViewModel.

Once you have defined the User property, you can easily set the pages of which the authentication is required by setting the RequiresAuthentication property of those pages to true. Role-based security is also supported through the same authentication context that implemented in the User property.

For more information, see Advanced Features in ClientUI Navigation Framework.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.