AuthenticationBase<T>.GetAuthenticatedUser Method
[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.]
Gets the user for the authenticated principal.
Namespace: System.ServiceModel.DomainServices.Server.ApplicationServices
Assembly: System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)
Syntax
'Declaration
Protected Overridable Function GetAuthenticatedUser ( _
principal As IPrincipal _
) As T
'Usage
Dim principal As IPrincipal
Dim returnValue As T
returnValue = Me.GetAuthenticatedUser(principal)
protected virtual T GetAuthenticatedUser(
IPrincipal principal
)
protected:
virtual T GetAuthenticatedUser(
IPrincipal^ principal
)
abstract GetAuthenticatedUser :
principal:IPrincipal -> 'T
override GetAuthenticatedUser :
principal:IPrincipal -> 'T
protected function GetAuthenticatedUser(
principal : IPrincipal
) : T
Parameters
- principal
Type: System.Security.Principal.IPrincipal
The principal to get the user for.
Return Value
Type: T
The user for the authenticated principal. This value is never nulla null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | The attempt to create a new authenticated user resulted in nulla null reference (Nothing in Visual Basic). |
Remarks
This method is invoked from Login and GetUser for authenticated users. By default, the user is populated with data from principal, Roles, and ProfileBase. The base implementation does not need to be invoked when this method is overridden.
See Also
Reference
System.ServiceModel.DomainServices.Server.ApplicationServices Namespace