Exemplo n.º 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);
        }
 public void LiveAuthClient_GetUserId_Invalid()
 {
     LiveAuthClient authClient = new LiveAuthClient("000000004802B729", "password", null);
     string uid = authClient.GetUserId("etaeetwetw");
 }
 public void LiveAuthClient_GetUserId_Empty()
 {
     LiveAuthClient authClient = new LiveAuthClient("000000004802B729", "password", null);
     string uid = authClient.GetUserId("");            
 }
 public void LiveAuthClient_GetUserId_Invalid()
 {
     LiveAuthClient authClient = new LiveAuthClient("000000004802B729", "password", null);
     string         uid        = authClient.GetUserId("etaeetwetw");
 }
 public void LiveAuthClient_GetUserId_Empty()
 {
     LiveAuthClient authClient = new LiveAuthClient("000000004802B729", "password", null);
     string         uid        = authClient.GetUserId("");
 }