diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2011-04-07 08:01:44 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2011-04-07 08:01:44 -0700 |
commit | cb6027d9171f1411965e070a328e090594e3231c (patch) | |
tree | 2e12c640af6137b81fd765d19fdae8334d494d1f /samples/OAuthResourceServer/Code/Global.cs | |
parent | 7517491e79bb91241acbd46292006e8c999ec211 (diff) | |
download | DotNetOpenAuth-cb6027d9171f1411965e070a328e090594e3231c.zip DotNetOpenAuth-cb6027d9171f1411965e070a328e090594e3231c.tar.gz DotNetOpenAuth-cb6027d9171f1411965e070a328e090594e3231c.tar.bz2 |
Fixed static field initialization.
Diffstat (limited to 'samples/OAuthResourceServer/Code/Global.cs')
-rw-r--r-- | samples/OAuthResourceServer/Code/Global.cs | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/samples/OAuthResourceServer/Code/Global.cs b/samples/OAuthResourceServer/Code/Global.cs index a70930b..a48baff 100644 --- a/samples/OAuthResourceServer/Code/Global.cs +++ b/samples/OAuthResourceServer/Code/Global.cs @@ -32,15 +32,6 @@ #endif /// <summary> - /// The authorization server crypto service provider that contains a public key. - /// </summary> - /// <remarks> - /// Since <see cref="RSACryptoServiceProvider"/> are not thread-safe, one must be created for each thread. - /// </remarks> - [ThreadStatic] - public static readonly RSACryptoServiceProvider AuthorizationServerSigningServiceProvider = CreateAuthorizationServerSigningServiceProvider(); - - /// <summary> /// An application memory cache of recent log messages. /// </summary> public static StringBuilder LogMessages = new StringBuilder(); @@ -74,19 +65,10 @@ #endif /// <summary> - /// The crypto service provider for this resource server that contains the private key used to decrypt an access token. - /// </summary> - /// <remarks> - /// Since <see cref="RSACryptoServiceProvider"/> are not thread-safe, one must be created for each thread. - /// </remarks> - [ThreadStatic] - internal static readonly RSACryptoServiceProvider ResourceServerEncryptionServiceProvider = CreateResourceServerEncryptionServiceProvider(); - - /// <summary> /// Creates the crypto service provider for this resource server that contains the private key used to decrypt an access token. /// </summary> /// <returns>An RSA crypto service provider.</returns> - private static RSACryptoServiceProvider CreateResourceServerEncryptionServiceProvider() { + internal static RSACryptoServiceProvider CreateResourceServerEncryptionServiceProvider() { var resourceServerEncryptionServiceProvider = new RSACryptoServiceProvider(); resourceServerEncryptionServiceProvider.ImportParameters(ResourceServerEncryptionPrivateKey); return resourceServerEncryptionServiceProvider; @@ -96,7 +78,7 @@ /// Creates the crypto service provider for the authorization server that contains the public key used to verify an access token signature. /// </summary> /// <returns>An RSA crypto service provider.</returns> - private static RSACryptoServiceProvider CreateAuthorizationServerSigningServiceProvider() { + internal static RSACryptoServiceProvider CreateAuthorizationServerSigningServiceProvider() { var authorizationServerSigningServiceProvider = new RSACryptoServiceProvider(); authorizationServerSigningServiceProvider.ImportParameters(AuthorizationServerSigningPublicKey); return authorizationServerSigningServiceProvider; |