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)
Syntax
'Declaration
<AuthenticationServiceAttribute> _
Public Interface IAuthentication(Of T As IUser)
'Usage
Dim instance As IAuthentication(Of T)
[AuthenticationServiceAttribute]
public interface IAuthentication<T>
where T : IUser
[AuthenticationServiceAttribute]
generic<typename T>
where T : IUser
public interface class IAuthentication
[<AuthenticationServiceAttribute>]
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.
Methods
Name | Description | |
---|---|---|
GetUser | Retrieves the principal and profile for the current user. | |
Login | Authenticates and returns the user with the specified name and password. | |
Logout | Logs out an authenticated user. | |
UpdateUser | Updates the profile for the authenticated user. |
Top
Remarks
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
Reference
System.ServiceModel.DomainServices.Server.ApplicationServices Namespace