Exemplo n.º 1
0
        static IPublicClientApplication GetClientApp(string applicationClientId, string tenantID, string redirectURI)
        {
            if (string.IsNullOrEmpty(tenantID))
            {
                tenantID = defaultTenant;
            }
            if (string.IsNullOrEmpty(redirectURI))
            {
                redirectURI = defaultRedirect;
            }
            if (clientApp == null)
            {
#if UNITY_EDITOR
                redirectURI = defaultRedirect;
#endif
                clientApp = PublicClientApplicationBuilder.Create(applicationClientId).WithAuthority(authority + tenantID).WithRedirectUri(redirectURI).Build();
                AADTokenCache.EnableSerialization(clientApp.UserTokenCache);
            }
            return(clientApp);
        }
Exemplo n.º 2
0
 public static void PrepareOnMainThread()
 {
     //Nothing needs to be done here, just need to wake up this static class on the main thread
     AADTokenCache.PrepareOnMainThread();
 }