public AuthorizedUserApplicationDefaultCredentials(ApplicationDefaultCredentials applicationDefaultCredentials) { ClientId = new OAuth.ClientID(applicationDefaultCredentials.Content["client_id"]); ClientSecret = new OAuth.ClientSecret(applicationDefaultCredentials.Content["client_secret"]); RefreshToken = new OAuth.RefreshToken(applicationDefaultCredentials.Content["refresh_token"]); Type = AuthorizedUser; }
public AuthorizedUserApplicationDefaultCredentials(OAuth.ClientID clientId, OAuth.ClientSecret clientSecret, OAuth.RefreshToken refreshToken) { ClientId = clientId; ClientSecret = clientSecret; RefreshToken = refreshToken; Type = AuthorizedUser; }
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); }