public BaseLoginProvider(IAADLogger logger, IUserStore userStore, string clientId, string authority) { Logger = logger; ClientId = clientId; Authority = authority; Store = userStore; }
public FileTokenCache(IAADLogger logger, string filename = "TokenCache.dat") { _logger = logger; filePath = Application.persistentDataPath + Path.DirectorySeparatorChar + filename; AfterAccess = OnAfterAccess; BeforeAccess = OnBeforeAccess; }
public static void RegisterProviders(IAADLogger logger, IUserStore userStore, string clientId, string authority, string tenantId) { // Register the login providers // Providers.Add("WAM", new WAMLoginProvider(logger, userStore, clientId, authority)); Providers.Add("MSAL", new MSALLoginProvider(logger, userStore, clientId, authority, tenantId)); Providers.Add("ADAL", new ADALLoginProvider(logger, userStore, clientId, authority, tenantId)); Providers.Add("WAMWAB", new WAMWABLoginProvider(logger, userStore, clientId, authority)); Providers.Add("WAB", new WABLoginProvider(logger, userStore, clientId, authority)); Providers.Add("WAP", new WAPLoginProvider(logger, userStore, clientId, authority)); }
private void HandleAdalException(AdalException e, IAADLogger Logger) { // Exception: AdalException // Represents a library exception generated by ADAL .NET. // e.ErrorCode contains the error code // Action: Case 1, Non-Retryable // Do not perform an immediate retry. Only retry after user action. // Example Errors: network_not_available, default case Logger.Log($"AdalException Message: {e.Message}"); Logger.Log($"AdalException Error Code: {e.ErrorCode.ToString()}"); }
private void HandleAdalServiceException(AdalServiceException e, IAADLogger Logger) { // Exception: AdalServiceException // Represents an error produced by the STS. // e.ErrorCode contains the error code and description, which can be used for debugging. // NOTE: Do not code a dependency on the contents of the error description, as it can change over time. // Design time consideration: Certain errors may be caused at development and exposed through this exception. // Looking inside the description will give more guidance on resolving the specific issue. // Action: Case 1: Non-Retryable // Do not perform an immediate retry. Only retry after user action. // Example Errors: default case Logger.Log($"AdalServiceException Message: {e.Message}"); Logger.Log($"AdalServiceException Status Code: {e.StatusCode.ToString()}"); }
public WAMLoginProvider(IAADLogger logger, IUserStore userStore, string clientId, string authority, bool biometricsRequired = true) : base(logger, userStore, clientId, authority) { BiometricsRequired = biometricsRequired; }
public WAMWABLoginProvider(IAADLogger Logger, IUserStore userStore, string clientId, string authority) : base(Logger, userStore, clientId, authority) { }
public ADALLoginProvider(IAADLogger Logger, IUserStore userStore, string clientId, string authority, string tenantId) : base(Logger, userStore, clientId, authority) { TenantId = tenantId; }