C# Class SharpCifs.Smb.NtlmAuthenticator

This class can be extended by applications that wish to trap authentication related exceptions and automatically retry the exceptional operation with different credentials.
This class can be extended by applications that wish to trap authentication related exceptions and automatically retry the exceptional operation with different credentials. Read jCIFS Exceptions and NtlmAuthenticator for complete details.
Mostra file Open project: brandonprry/Potato

Public Methods

Method Description
RequestNtlmPasswordAuthentication ( string url, SmbAuthException sae ) : NtlmPasswordAuthentication

Used internally by jCIFS when an SmbAuthException is trapped to retrieve new user credentials.

Used internally by jCIFS when an SmbAuthException is trapped to retrieve new user credentials.

SetDefault ( NtlmAuthenticator a ) : void

Set the default NtlmAuthenticator.

Set the default NtlmAuthenticator. Once the default authenticator is set it cannot be changed. Calling this metho again will have no effect.

Protected Methods

Method Description
GetNtlmPasswordAuthentication ( ) : NtlmPasswordAuthentication

An application extending this class must provide an implementation for this method that returns new user credentials try try when accessing SMB resources described by the getRequestingURL and getRequestingException methods.

An application extending this class must provide an implementation for this method that returns new user credentials try try when accessing SMB resources described by the getRequestingURL and getRequestingException methods. If this method returns null the SmbAuthException that triggered the authenticator check will simply be rethrown. The default implementation returns null.

GetRequestingException ( ) : SmbAuthException
GetRequestingUrl ( ) : string

Private Methods

Method Description
Reset ( ) : void

Method Details

GetNtlmPasswordAuthentication() protected method

An application extending this class must provide an implementation for this method that returns new user credentials try try when accessing SMB resources described by the getRequestingURL and getRequestingException methods.
An application extending this class must provide an implementation for this method that returns new user credentials try try when accessing SMB resources described by the getRequestingURL and getRequestingException methods. If this method returns null the SmbAuthException that triggered the authenticator check will simply be rethrown. The default implementation returns null.
protected GetNtlmPasswordAuthentication ( ) : NtlmPasswordAuthentication
return NtlmPasswordAuthentication

GetRequestingException() protected method

protected GetRequestingException ( ) : SmbAuthException
return SmbAuthException

GetRequestingUrl() protected method

protected GetRequestingUrl ( ) : string
return string

RequestNtlmPasswordAuthentication() public static method

Used internally by jCIFS when an SmbAuthException is trapped to retrieve new user credentials.
Used internally by jCIFS when an SmbAuthException is trapped to retrieve new user credentials.
public static RequestNtlmPasswordAuthentication ( string url, SmbAuthException sae ) : NtlmPasswordAuthentication
url string
sae SmbAuthException
return NtlmPasswordAuthentication

SetDefault() public static method

Set the default NtlmAuthenticator.
Set the default NtlmAuthenticator. Once the default authenticator is set it cannot be changed. Calling this metho again will have no effect.
public static SetDefault ( NtlmAuthenticator a ) : void
a NtlmAuthenticator
return void