35 lines
No EOL
1.3 KiB
C#
35 lines
No EOL
1.3 KiB
C#
using System.Net;
|
|
|
|
namespace JD.Oasis.Service.API
|
|
{
|
|
/// <summary>
|
|
/// Used by the Oasis Service to authenticate to the Oasis Web Service
|
|
/// using alternative credentials in place of Windows credentials
|
|
/// </summary>
|
|
public interface ICredentialsManager
|
|
{
|
|
/// <summary>
|
|
/// Return true if alternative credentials are already stored locally, false otherwise
|
|
/// </summary>
|
|
bool UseAltCredentials { get; }
|
|
|
|
/// <summary>
|
|
/// Try to return alternative credentials if they are already stored locally.
|
|
/// It returns false if no credentials were retrieved.
|
|
/// </summary>
|
|
/// <param name="networkCredential">The alternative credentials. Null if none were retrieved</param>
|
|
bool TryGetStoredAltCredentials(out NetworkCredential networkCredential);
|
|
|
|
/// <summary>
|
|
/// Try to get alternative credentials fetched from user.
|
|
/// It returns false if no credentials were retrieved.
|
|
/// </summary>
|
|
/// <param name="networkCredential">The alternative credentials. Null if none were retrieved</param>
|
|
bool TryAskAltCredentials(out NetworkCredential networkCredential);
|
|
|
|
/// <summary>
|
|
/// Store locally the credentials
|
|
/// </summary>
|
|
void StoreAltCredentials(string username, string password);
|
|
}
|
|
} |