IAuthentication<T> Interface

WCF RIA Services

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Defines methods for domain service instances that encapsulates the authentication domain.

Namespace:  System.ServiceModel.DomainServices.Server.ApplicationServices
Assembly:  System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)

public interface IAuthentication<T>
where T : IUser

Type Parameters


The type of user entity.

The IAuthentication<T> type exposes the following members.

Public methodGetUserRetrieves the principal and profile for the current user.
Public methodLoginAuthenticates and returns the user with the specified name and password.
Public methodLogoutLogs out an authenticated user.
Public methodUpdateUserUpdates the profile for the authenticated user.

A domain service implementing this interface will be used to populate the user on both the client and server. The WebAuthenticationService class works with the generated DomainContext for any domain service implementing this interface.

The UpdateUser method is designed as an update method, and is invoked by calling the SubmitChanges method on the client. This implementation has an important point to consider when developing your application. When you invoke the UpdateUser method by calling SaveUser, you submit all changes that have occurred in the DomainContext and may therefore invoke other update methods. Conversely, when you invoke other update methods on the DomainContext, you submit all changes in the domain context and may invoke the UpdateUser method.