IAuthentication<T> Interface

[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)


<AuthenticationServiceAttribute> _
Public Interface IAuthentication(Of T As IUser)
Dim instance As IAuthentication(Of T)
public interface IAuthentication<T>
where T : IUser
generic<typename T>
where T : IUser
public interface class IAuthentication
type IAuthentication<'T when 'T : IUser> =  interface end
JScript does not support generic types and methods.

Type Parameters

  • T
    The type of user entity.

The IAuthentication<T> type exposes the following members.


  Name Description
Public method GetUser Retrieves the principal and profile for the current user.
Public method Login Authenticates and returns the user with the specified name and password.
Public method Logout Logs out an authenticated user.
Public method UpdateUser Updates 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.

See Also


System.ServiceModel.DomainServices.Server.ApplicationServices Namespace