SPClaimsAuthenticationManager.Authenticate Method
Confirms the security context of the user on whose behalf the code is running.
Namespace: Microsoft.SharePoint.IdentityModel
Assembly: Microsoft.SharePoint.IdentityModel (in Microsoft.SharePoint.IdentityModel.dll)
Syntax
'Declaration
Public Overrides Function Authenticate ( _
resourceName As String, _
incomingPrincipal As IClaimsPrincipal _
) As IClaimsPrincipal
'Usage
Dim instance As SPClaimsAuthenticationManager
Dim resourceName As String
Dim incomingPrincipal As IClaimsPrincipal
Dim returnValue As IClaimsPrincipal
returnValue = instance.Authenticate(resourceName, _
incomingPrincipal)
public override IClaimsPrincipal Authenticate(
string resourceName,
IClaimsPrincipal incomingPrincipal
)
Parameters
resourceName
Type: System.StringThe address to which the request was sent.
incomingPrincipal
Type: IClaimsPrincipalThe credentials presented by the client, in the form of a SecurityToken, to access a resource at resourceName.
Return Value
Type: IClaimsPrincipal
The principal given to the method.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | incomingPrincipal is null . |
Remarks
This override checks the incoming principal to return the correct principal. If the user is authenticated, this override calls the Authenticate() method of the base class to get the principal specified by incomingPrincipal; otherwise, this override returns the anonymous principal.
See Also
Reference
SPClaimsAuthenticationManager Class