Esempio n. 1
0
 public BaseLoginProvider(IAADLogger logger, IUserStore userStore, string clientId, string authority)
 {
     Logger    = logger;
     ClientId  = clientId;
     Authority = authority;
     Store     = userStore;
 }
Esempio n. 2
0
        public FileTokenCache(IAADLogger logger, string filename = "TokenCache.dat")
        {
            _logger  = logger;
            filePath = Application.persistentDataPath + Path.DirectorySeparatorChar + filename;

            AfterAccess  = OnAfterAccess;
            BeforeAccess = OnBeforeAccess;
        }
Esempio n. 3
0
 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));
 }
Esempio n. 4
0
    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()}");
    }
Esempio n. 5
0
    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()}");
    }
Esempio n. 6
0
 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)
 {
 }
Esempio n. 8
0
 public ADALLoginProvider(IAADLogger Logger, IUserStore userStore, string clientId, string authority, string tenantId) :
     base(Logger, userStore, clientId, authority)
 {
     TenantId = tenantId;
 }