summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/OAuthConsumer/GoogleAddressBook.aspx.cs4
-rw-r--r--samples/OAuthConsumer/SampleWcf.aspx.cs16
-rw-r--r--samples/OAuthConsumer/SignInWithTwitter.aspx.cs6
-rw-r--r--samples/OAuthConsumer/Twitter.aspx.cs16
-rw-r--r--samples/OAuthConsumerWpf/App.config2
-rw-r--r--samples/OAuthConsumerWpf/MainWindow.xaml.cs2
-rw-r--r--samples/OAuthServiceProvider/Default.aspx.cs2
-rw-r--r--samples/OAuthServiceProvider/Members/Authorize.aspx.cs12
-rw-r--r--samples/OpenIdProviderMvc/Views/Web.config4
9 files changed, 32 insertions, 32 deletions
diff --git a/samples/OAuthConsumer/GoogleAddressBook.aspx.cs b/samples/OAuthConsumer/GoogleAddressBook.aspx.cs
index 825dd1a..808065f 100644
--- a/samples/OAuthConsumer/GoogleAddressBook.aspx.cs
+++ b/samples/OAuthConsumer/GoogleAddressBook.aspx.cs
@@ -37,7 +37,7 @@
protected void Page_Load(object sender, EventArgs e) {
if (this.TokenManager != null) {
- MultiView1.ActiveViewIndex = 1;
+ this.MultiView1.ActiveViewIndex = 1;
if (!IsPostBack) {
var google = new WebConsumer(GoogleConsumer.ServiceDescription, this.TokenManager);
@@ -69,7 +69,7 @@
HttpUtility.HtmlEncode(contact.Email));
}
tableBuilder.Append("</table>");
- resultsPlaceholder.Controls.Add(new Literal { Text = tableBuilder.ToString() });
+ this.resultsPlaceholder.Controls.Add(new Literal { Text = tableBuilder.ToString() });
}
}
} \ No newline at end of file
diff --git a/samples/OAuthConsumer/SampleWcf.aspx.cs b/samples/OAuthConsumer/SampleWcf.aspx.cs
index 4055c6c..489e294 100644
--- a/samples/OAuthConsumer/SampleWcf.aspx.cs
+++ b/samples/OAuthConsumer/SampleWcf.aspx.cs
@@ -26,7 +26,7 @@
var accessTokenMessage = consumer.ProcessUserAuthorization();
if (accessTokenMessage != null) {
Session["WcfAccessToken"] = accessTokenMessage.AccessToken;
- authorizationLabel.Text = "Authorized! Access token: " + accessTokenMessage.AccessToken;
+ this.authorizationLabel.Text = "Authorized! Access token: " + accessTokenMessage.AccessToken;
}
}
}
@@ -36,7 +36,7 @@
WebConsumer consumer = this.CreateConsumer();
UriBuilder callback = new UriBuilder(Request.Url);
callback.Query = null;
- string[] scopes = (from item in scopeList.Items.OfType<ListItem>()
+ string[] scopes = (from item in this.scopeList.Items.OfType<ListItem>()
where item.Selected
select item.Value).ToArray();
string scope = string.Join("|", scopes);
@@ -49,27 +49,27 @@
protected void getNameButton_Click(object sender, EventArgs e) {
try {
- nameLabel.Text = CallService(client => client.GetName());
+ this.nameLabel.Text = CallService(client => client.GetName());
} catch (SecurityAccessDeniedException) {
- nameLabel.Text = "Access denied!";
+ this.nameLabel.Text = "Access denied!";
}
}
protected void getAgeButton_Click(object sender, EventArgs e) {
try {
int? age = CallService(client => client.GetAge());
- ageLabel.Text = age.HasValue ? age.Value.ToString(CultureInfo.CurrentCulture) : "not available";
+ this.ageLabel.Text = age.HasValue ? age.Value.ToString(CultureInfo.CurrentCulture) : "not available";
} catch (SecurityAccessDeniedException) {
- ageLabel.Text = "Access denied!";
+ this.ageLabel.Text = "Access denied!";
}
}
protected void getFavoriteSites_Click(object sender, EventArgs e) {
try {
string[] favoriteSites = CallService(client => client.GetFavoriteSites());
- favoriteSitesLabel.Text = string.Join(", ", favoriteSites);
+ this.favoriteSitesLabel.Text = string.Join(", ", favoriteSites);
} catch (SecurityAccessDeniedException) {
- favoriteSitesLabel.Text = "Access denied!";
+ this.favoriteSitesLabel.Text = "Access denied!";
}
}
diff --git a/samples/OAuthConsumer/SignInWithTwitter.aspx.cs b/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
index 9cea1f5..5bc46ef 100644
--- a/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
+++ b/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
@@ -15,14 +15,14 @@
public partial class SignInWithTwitter : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e) {
if (TwitterConsumer.IsTwitterConsumerConfigured) {
- MultiView1.ActiveViewIndex = 1;
+ this.MultiView1.ActiveViewIndex = 1;
if (!IsPostBack) {
string screenName;
int userId;
if (TwitterConsumer.TryFinishSignInWithTwitter(out screenName, out userId)) {
- loggedInPanel.Visible = true;
- loggedInName.Text = screenName;
+ this.loggedInPanel.Visible = true;
+ this.loggedInName.Text = screenName;
// In a real app, the Twitter username would likely be used
// to log the user into the application.
diff --git a/samples/OAuthConsumer/Twitter.aspx.cs b/samples/OAuthConsumer/Twitter.aspx.cs
index 44350ca..8288ed0 100644
--- a/samples/OAuthConsumer/Twitter.aspx.cs
+++ b/samples/OAuthConsumer/Twitter.aspx.cs
@@ -36,7 +36,7 @@
protected void Page_Load(object sender, EventArgs e) {
if (this.TokenManager != null) {
- MultiView1.ActiveViewIndex = 1;
+ this.MultiView1.ActiveViewIndex = 1;
if (!IsPostBack) {
var twitter = new WebConsumer(TwitterConsumer.ServiceDescription, this.TokenManager);
@@ -74,13 +74,13 @@
HttpUtility.HtmlEncode(update.Status));
}
tableBuilder.Append("</table>");
- resultsPlaceholder.Controls.Add(new Literal { Text = tableBuilder.ToString() });
+ this.resultsPlaceholder.Controls.Add(new Literal { Text = tableBuilder.ToString() });
}
protected void uploadProfilePhotoButton_Click(object sender, EventArgs e) {
- if (profilePhoto.PostedFile.ContentType == null) {
- photoUploadedLabel.Visible = true;
- photoUploadedLabel.Text = "Select a file first.";
+ if (this.profilePhoto.PostedFile.ContentType == null) {
+ this.photoUploadedLabel.Visible = true;
+ this.photoUploadedLabel.Text = "Select a file first.";
return;
}
@@ -88,9 +88,9 @@
XDocument imageResult = TwitterConsumer.UpdateProfileImage(
twitter,
this.AccessToken,
- profilePhoto.PostedFile.InputStream,
- profilePhoto.PostedFile.ContentType);
- photoUploadedLabel.Visible = true;
+ this.profilePhoto.PostedFile.InputStream,
+ this.profilePhoto.PostedFile.ContentType);
+ this.photoUploadedLabel.Visible = true;
}
}
} \ No newline at end of file
diff --git a/samples/OAuthConsumerWpf/App.config b/samples/OAuthConsumerWpf/App.config
index d4d434a..dab6eed 100644
--- a/samples/OAuthConsumerWpf/App.config
+++ b/samples/OAuthConsumerWpf/App.config
@@ -89,7 +89,7 @@
</wsHttpBinding>
</bindings>
<client>
- <endpoint address="http://localhost:65169/OAuthServiceProvider/DataApi.svc"
+ <endpoint address="http://localhost:65169/DataApi.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IDataApi"
contract="WcfSampleService.IDataApi" name="WSHttpBinding_IDataApi">
<identity>
diff --git a/samples/OAuthConsumerWpf/MainWindow.xaml.cs b/samples/OAuthConsumerWpf/MainWindow.xaml.cs
index 8c8d035..24d5249 100644
--- a/samples/OAuthConsumerWpf/MainWindow.xaml.cs
+++ b/samples/OAuthConsumerWpf/MainWindow.xaml.cs
@@ -66,7 +66,7 @@
this.wcfTokenManager.ConsumerKey = "sampleconsumer";
this.wcfTokenManager.ConsumerSecret = "samplesecret";
MessageReceivingEndpoint oauthEndpoint = new MessageReceivingEndpoint(
- new Uri("http://localhost:65169/OAuthServiceProvider/OAuth.ashx"),
+ new Uri("http://localhost:65169/OAuth.ashx"),
HttpDeliveryMethods.PostRequest);
this.wcf = new DesktopConsumer(
new ServiceProviderDescription {
diff --git a/samples/OAuthServiceProvider/Default.aspx.cs b/samples/OAuthServiceProvider/Default.aspx.cs
index 66adc82..653046a 100644
--- a/samples/OAuthServiceProvider/Default.aspx.cs
+++ b/samples/OAuthServiceProvider/Default.aspx.cs
@@ -38,7 +38,7 @@
});
dc.SubmitChanges();
- databaseStatus.Visible = true;
+ this.databaseStatus.Visible = true;
} catch (System.Data.SqlClient.SqlException ex) {
foreach (System.Data.SqlClient.SqlError error in ex.Errors) {
Response.Write(error.Message);
diff --git a/samples/OAuthServiceProvider/Members/Authorize.aspx.cs b/samples/OAuthServiceProvider/Members/Authorize.aspx.cs
index ec98ddf..74b44c5 100644
--- a/samples/OAuthServiceProvider/Members/Authorize.aspx.cs
+++ b/samples/OAuthServiceProvider/Members/Authorize.aspx.cs
@@ -38,15 +38,15 @@
byte[] randomData = new byte[8];
CryptoRandomDataGenerator.GetBytes(randomData);
this.AuthorizationSecret = Convert.ToBase64String(randomData);
- OAuthAuthorizationSecToken.Value = this.AuthorizationSecret;
+ this.OAuthAuthorizationSecToken.Value = this.AuthorizationSecret;
- OAuth10ConsumerWarning.Visible = Global.PendingOAuthAuthorization.IsUnsafeRequest;
+ this.OAuth10ConsumerWarning.Visible = Global.PendingOAuthAuthorization.IsUnsafeRequest;
}
}
}
protected void allowAccessButton_Click(object sender, EventArgs e) {
- if (this.AuthorizationSecret != OAuthAuthorizationSecToken.Value) {
+ if (this.AuthorizationSecret != this.OAuthAuthorizationSecToken.Value) {
throw new ArgumentException(); // probably someone trying to hack in.
}
this.AuthorizationSecret = null; // clear one time use secret
@@ -60,10 +60,10 @@
sp.Channel.Send(response);
} else {
if (pending.IsUnsafeRequest) {
- verifierMultiView.ActiveViewIndex = 1;
+ this.verifierMultiView.ActiveViewIndex = 1;
} else {
string verifier = ServiceProvider.CreateVerificationCode(VerificationCodeFormat.AlphaNumericNoLookAlikes, 10);
- verificationCodeLabel.Text = verifier;
+ this.verificationCodeLabel.Text = verifier;
ITokenContainingMessage requestTokenMessage = pending;
var requestToken = Global.TokenManager.GetRequestToken(requestTokenMessage.Token);
requestToken.VerificationCode = verifier;
@@ -74,7 +74,7 @@
protected void denyAccessButton_Click(object sender, EventArgs e) {
// erase the request token.
- multiView.ActiveViewIndex = 2;
+ this.multiView.ActiveViewIndex = 2;
}
}
} \ No newline at end of file
diff --git a/samples/OpenIdProviderMvc/Views/Web.config b/samples/OpenIdProviderMvc/Views/Web.config
index 95bc467..df0103b 100644
--- a/samples/OpenIdProviderMvc/Views/Web.config
+++ b/samples/OpenIdProviderMvc/Views/Web.config
@@ -12,9 +12,9 @@
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
- <pages validateRequest="false" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <pages validateRequest="false" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<controls>
- <add assembly="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" namespace="System.Web.Mvc" tagPrefix="mvc" />
+ <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>