Name

CredentialCache

Synopsis

This class maintains credentials for multiple network resources. If you are developing a client application that needs to authenticate itself to more than one server, you can store an instance of this class in the WebRequest.Credentials property.

After you create an instance of this class, use the Add() method to associate NetworkCredential objects with a URI and authentication type (using a string such as "Basic" or "Digest"). Then you can assign the CredentialCache instance to the WebRequest.Credentials property to use the credentials for future web requests.

Public Class CredentialCache : Implements ICredentials, IEnumerable
' Public Constructors
   Public Sub New() 
' Public Shared Properties
   Public Shared ReadOnly Property DefaultCredentials As ICredentials  
' Public Instance Methods
   Public Sub Add(ByVal uriPrefix As Uri, 
        ByVal authType As String, 
        ByVal cred As NetworkCredential) 
   Public Function GetCredential(ByVal uriPrefix As Uri, 
        ByVal authType As String) As NetworkCredential Implements ICredentials.GetCredential 
   Public Function GetEnumerator(
        ) As IEnumerator Implements IEnumerable.GetEnumerator 
   Public Sub Remove(ByVal uriPrefix As Uri, 
        ByVal authType As String) 
End Class

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.