Exemple #1
0
        public static async Task <AuthorizedUserApplicationDefaultCredentials> DoEndUserOAuthFlow(ApplicationOAuthConfiguration applicationOAuthConfiguration)
        {
            OAuth.RefreshToken refreshToken = await RefreshLoginInteractive(applicationOAuthConfiguration);

            AuthorizedUserApplicationDefaultCredentials authorizedUserApplicationDefaultCredentials = new AuthorizedUserApplicationDefaultCredentials(applicationOAuthConfiguration.ClientID, applicationOAuthConfiguration.ClientSecret, refreshToken);

            return(authorizedUserApplicationDefaultCredentials);
        }
Exemple #2
0
 public ApplicationDefaultCredentials(AuthorizedUserApplicationDefaultCredentials authorizedUserApplicationDefaultCredentials)
 {
     Content                  = new Dictionary <string, string>();
     Content["type"]          = AuthorizedUser;
     Content["client_id"]     = (string)authorizedUserApplicationDefaultCredentials.ClientId;
     Content["client_secret"] = (string)authorizedUserApplicationDefaultCredentials.ClientSecret;
     Content["refresh_token"] = (string)authorizedUserApplicationDefaultCredentials.RefreshToken;
 }