summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth2/OAuth2/AccessToken.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-03-01 21:33:22 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2013-03-01 21:33:22 -0800
commitd4d806fbcc1c7cdc86ec8234c5792bbaf667d5a8 (patch)
tree93004acbee42d003dc38674fc50826d0d440583b /src/DotNetOpenAuth.OAuth2/OAuth2/AccessToken.cs
parent6204dcf07f31b78478bc1ddb55a6ca9027617b67 (diff)
parent74b6b4efd2be2680e3067f716829b0c9385ceebe (diff)
downloadDotNetOpenAuth-d4d806fbcc1c7cdc86ec8234c5792bbaf667d5a8.zip
DotNetOpenAuth-d4d806fbcc1c7cdc86ec8234c5792bbaf667d5a8.tar.gz
DotNetOpenAuth-d4d806fbcc1c7cdc86ec8234c5792bbaf667d5a8.tar.bz2
Merge branch 'httpclient' into OAuthSimple
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2/OAuth2/AccessToken.cs')
-rw-r--r--src/DotNetOpenAuth.OAuth2/OAuth2/AccessToken.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/AccessToken.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/AccessToken.cs
index fa87972..a8c911e 100644
--- a/src/DotNetOpenAuth.OAuth2/OAuth2/AccessToken.cs
+++ b/src/DotNetOpenAuth.OAuth2/OAuth2/AccessToken.cs
@@ -57,6 +57,15 @@ namespace DotNetOpenAuth.OAuth2 {
}
/// <summary>
+ /// Creates a formatter capable of serializing/deserializing an access token.
+ /// </summary>
+ /// <returns>An access token serializer.</returns>
+ internal static IDataBagFormatter<AccessToken> CreateFormatter(ICryptoKeyStore symmetricKeyStore) {
+ Requires.NotNull(symmetricKeyStore, "symmetricKeyStore");
+ return new UriStyleMessageFormatter<AccessToken>(symmetricKeyStore, bucket: "AccessTokens", signed: true, encrypted: true);
+ }
+
+ /// <summary>
/// Initializes this instance of the <see cref="AccessToken"/> class.
/// </summary>
/// <param name="authorization">The authorization to apply to this access token.</param>