protected void lnkbtnYandexClick(object sender, EventArgs e) { var oAuthRequest = new OAuthRequest { Provider = OAuthRequest.Providers.Yandex }; oAuthRequest.CreateRequest(new ClaimParameters(), false); }
protected void lnkbtnGoogleClick(object sender, EventArgs e) { var oAuthRequest = new OAuthRequest { Provider = OAuthRequest.Providers.Google }; var parameters = new FetchParameters(); parameters.OpenidUserInformation.Add(RequestParameters.AxSchemaParams.Contact.email); parameters.OpenidUserInformation.Add(RequestParameters.AxSchemaParams.NamePerson.First); parameters.OpenidUserInformation.Add(RequestParameters.AxSchemaParams.NamePerson.Last); oAuthRequest.CreateRequest(parameters); }
protected void lnkbtnMailClick(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtOauthUserId.Text)) { return; } var userId = txtOauthUserId.Text; if (userId.Contains("@")) { userId = userId.Substring(0, userId.IndexOf("@")); } var oAuthRequest = new OAuthRequest { UserId = userId, Provider = OAuthRequest.Providers.Mail }; oAuthRequest.CreateRequest(new ClaimParameters(), true); }
protected void lnkbtnMailClick(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtOauthUserId.Text)) { return; } var userId = txtOauthUserId.Text; var userIdAndDomainPair = txtOauthUserId.Text.Split(new[] { '@' }); if (userIdAndDomainPair.Length != 2) { return; } var oAuthRequest = new OAuthRequest { UserId = userId, Provider = OAuthRequest.Providers.Mail }; oAuthRequest.CreateRequest(new ClaimParameters(), true); }