OAuth2BearerCredentials.GetCredential method
Gets a [System.Net.NetworkCredential] object that is associated with the specified URI and authentication type.
Namespace: Microsoft.SharePoint.IdentityModel.OAuth2
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
Public Function GetCredential ( _
uri As Uri, _
authType As String _
) As NetworkCredential
'Usage
Dim instance As OAuth2BearerCredentials
Dim uri As Uri
Dim authType As String
Dim returnValue As NetworkCredential
returnValue = instance.GetCredential(uri, _
authType)
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
public NetworkCredential GetCredential(
Uri uri,
string authType
)
Parameters
uri
Type: System.UriThe URI.
authType
Type: System.StringThe authentication type.
Return value
Type: System.Net.NetworkCredential
The [System.Net.NetworkCredential] that is associated with the specified URI and authentication type, or, if no credentials are available, [null].
Implements
ICredentials.GetCredential(Uri, String)