Пример #1
0
        public void RegisterAccount(OAuthToken token, UserProfileInfo user)
        {
            LiveAuthClient auth = new LiveAuthClient(clientId, clientSecret, MogConstants.SKYDRIVE_REDIRECTURL);

            AuthCredential credential = new AuthCredential();
            credential.CloudService = CloudStorageServices.Skydrive;
            credential.Token = token.AccessToken;
            credential.Refresh = token.RefreshToken;
            credential.Authentication = token.AuthenticationToken;
            credential.Status = CredentialStatus.Approved;
            credential.UserId = user.Id;
            credential.Login = auth.GetUserId(token.AuthenticationToken);
            this.repoAuthCredential.Create(credential);
        }