Example #1
0
 public PublicClientHandler(string clientId)
 {
     ApplicationId           = clientId;
     PublicClientApplication = new PublicClientApplication(ApplicationId)
     {
         UserTokenCache = TokenCacheHelper.GetUserCache(),
         Component      = _component
     };
 }
Example #2
0
 public void CreateOrUpdatePublicClientApp(string interactiveAuthority, string applicationId)
 {
     if (string.IsNullOrWhiteSpace(interactiveAuthority))
     {
         // Use default authority
         PublicClientApplication = new PublicClientApplication(applicationId)
         {
             UserTokenCache = TokenCacheHelper.GetUserCache(),
             Component      = _component
         };
     }
     else
     {
         // Use the override authority provided
         PublicClientApplication = new PublicClientApplication(applicationId, interactiveAuthority)
         {
             UserTokenCache = TokenCacheHelper.GetUserCache(),
             Component      = _component
         };
     }
 }