summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth/OAuthClient.cs9
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs3
2 files changed, 11 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth/OAuthClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth/OAuthClient.cs
index 0bc8ed9..5e57f6e 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth/OAuthClient.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth/OAuthClient.cs
@@ -89,7 +89,14 @@
return AuthenticationResult.Failed;
}
- return VerifyAuthenticationCore(response);
+ // add the access token to the user data dictionary just in case page developers want to use it
+ AuthenticationResult result = VerifyAuthenticationCore(response);
+ if (result.IsSuccessful && result.ExtraData != null)
+ {
+ result.ExtraData["accesstoken"] = response.AccessToken;
+ }
+
+ return result;
}
/// <summary>
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs
index 276f5f4..ff50521 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs
@@ -83,6 +83,9 @@
name = id;
}
+ // add the access token to the user data dictionary just in case page developers want to use it
+ userData["accesstoken"] = accessToken;
+
return new AuthenticationResult(
isSuccessful: true,
provider: ProviderName,