diff options
Diffstat (limited to 'samples/OAuthConsumer')
-rw-r--r-- | samples/OAuthConsumer/SampleWcf2.aspx.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/samples/OAuthConsumer/SampleWcf2.aspx.cs b/samples/OAuthConsumer/SampleWcf2.aspx.cs index 55154bc..68965be 100644 --- a/samples/OAuthConsumer/SampleWcf2.aspx.cs +++ b/samples/OAuthConsumer/SampleWcf2.aspx.cs @@ -21,6 +21,21 @@ private static readonly WebServerClient Client; /// <summary> + /// The details about the sample OAuth-enabled WCF service that this sample client calls into. + /// </summary> + private static AuthorizationServerDescription authServerDescription = new AuthorizationServerDescription { + TokenEndpoint = new Uri("http://localhost:65169/OAuth.ashx"), + AuthorizationEndpoint = new Uri("http://localhost:65169/Members/Authorize.aspx"), + }; + + /// <summary> + /// Initializes static members of the <see cref="SampleWcf2"/> class. + /// </summary> + static SampleWcf2() { + Client = new WebServerClient(authServerDescription, "sampleconsumer", "samplesecret"); + } + + /// <summary> /// Gets or sets the authorization details for the logged in user. /// </summary> /// <value>The authorization details.</value> @@ -33,21 +48,6 @@ set { HttpContext.Current.Session["Authorization"] = value; } } - /// <summary> - /// Initializes static members of the <see cref="SampleWcf2"/> class. - /// </summary> - static SampleWcf2() { - Client = new WebServerClient(AuthServerDescription, "sampleconsumer", "samplesecret"); - } - - /// <summary> - /// The details about the sample OAuth-enabled WCF service that this sample client calls into. - /// </summary> - private static AuthorizationServerDescription AuthServerDescription = new AuthorizationServerDescription { - TokenEndpoint = new Uri("http://localhost:65169/OAuth.ashx"), - AuthorizationEndpoint = new Uri("http://localhost:65169/Members/Authorize.aspx"), - }; - protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Check to see if we're receiving a end user authorization response. |