示例#1
0
        public async Task SignIn(AuthenticationResult authenticationResult)
        {
            // Use the authentication result to get an access token
            this.CurrentToken = await OneDriveClient.GetAccessToken(authenticationResult).ConfigureAwait(false);

            // Create the OneDrive client, set the token refresh callback to save new tokens.
            await this.InitializeClient().ConfigureAwait(false);

            if (this.Relationship.Configuration.InitiallyCreatedUtc != DateTime.MinValue)
            {
                Logger.Debug("OneDriveAdapter SignIn successful. Saving relationship configuration.");
                await this.Relationship.SaveAsync().ConfigureAwait(false);
            }
        }