summaryrefslogtreecommitdiffstats
path: root/samples/ServiceProvider/OAuth.ashx
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-10-07 21:36:29 -0700
committerAndrew <andrewarnott@gmail.com>2008-10-07 21:36:29 -0700
commit29d897769f3e7a9568fa668836807d9a31b5fabc (patch)
treefb9a91e0804ed5a92d183268309ea0234732682b /samples/ServiceProvider/OAuth.ashx
parent43188751fe5c64c8f29f62e448a2c6a798910328 (diff)
downloadDotNetOpenAuth-29d897769f3e7a9568fa668836807d9a31b5fabc.zip
DotNetOpenAuth-29d897769f3e7a9568fa668836807d9a31b5fabc.tar.gz
DotNetOpenAuth-29d897769f3e7a9568fa668836807d9a31b5fabc.tar.bz2
Added strong-typed request token message to sample.
This proves that messages can be derived from and tailored to provide type-safe additions where the OAuth protocol permits it. As can be seen, several more types and members had to be made public for this to work.
Diffstat (limited to 'samples/ServiceProvider/OAuth.ashx')
-rw-r--r--samples/ServiceProvider/OAuth.ashx6
1 files changed, 3 insertions, 3 deletions
diff --git a/samples/ServiceProvider/OAuth.ashx b/samples/ServiceProvider/OAuth.ashx
index 55cd10c..cbb27cb 100644
--- a/samples/ServiceProvider/OAuth.ashx
+++ b/samples/ServiceProvider/OAuth.ashx
@@ -13,15 +13,15 @@ public class OAuth : IHttpHandler, IRequiresSessionState {
ServiceProvider sp;
public OAuth() {
- sp = new ServiceProvider(Constants.SelfDescription, Global.TokenManager);
+ sp = new ServiceProvider(Constants.SelfDescription, Global.TokenManager, new CustomOAuthTypeProvider(Global.TokenManager));
}
public void ProcessRequest(HttpContext context) {
IProtocolMessage request = sp.ReadRequest();
- RequestTokenMessage requestToken;
+ RequestScopedTokenMessage requestToken;
DirectUserToServiceProviderMessage requestAuth;
RequestAccessTokenMessage requestAccessToken;
- if ((requestToken = request as RequestTokenMessage) != null) {
+ if ((requestToken = request as RequestScopedTokenMessage) != null) {
sp.SendUnauthorizedTokenResponse(requestToken, null).Send();
} else if ((requestAuth = request as DirectUserToServiceProviderMessage) != null) {
Global.PendingOAuthAuthorization = requestAuth;