示例#1
0
 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;
 }
示例#2
0
 public AuthorizedUserApplicationDefaultCredentials(OAuth.ClientID clientId, OAuth.ClientSecret clientSecret, OAuth.RefreshToken refreshToken)
 {
     ClientId     = clientId;
     ClientSecret = clientSecret;
     RefreshToken = refreshToken;
     Type         = AuthorizedUser;
 }
示例#3
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);
        }