diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-05-31 08:29:04 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-05-31 08:29:04 -0700 |
commit | 2926368c2fde104a74afd1fc8ea34c9a5b72d3b6 (patch) | |
tree | 251f0754007e2302259856c61cf56b2d51799987 /src | |
parent | d5b264fed4bb3b0adb881ccaac3ae0a52ead7c56 (diff) | |
download | DotNetOpenAuth-2926368c2fde104a74afd1fc8ea34c9a5b72d3b6.zip DotNetOpenAuth-2926368c2fde104a74afd1fc8ea34c9a5b72d3b6.tar.gz DotNetOpenAuth-2926368c2fde104a74afd1fc8ea34c9a5b72d3b6.tar.bz2 |
Added authorizing user to the verification code.
The username is encrypted to avoid disclosing data to the client or a third party.
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/OAuthWrap/ChannelElements/VerificationCode.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth/OAuthWrap/ChannelElements/VerificationCode.cs b/src/DotNetOpenAuth/OAuthWrap/ChannelElements/VerificationCode.cs index e99a685..cc7f764 100644 --- a/src/DotNetOpenAuth/OAuthWrap/ChannelElements/VerificationCode.cs +++ b/src/DotNetOpenAuth/OAuthWrap/ChannelElements/VerificationCode.cs @@ -74,10 +74,10 @@ namespace DotNetOpenAuth.OAuthWrap.ChannelElements { // Encrypt the authorizing username so as to not expose unintended private user data // to the client or any eavesdropping third party. if (this.User != null) { - // TODO: code here + this.User = MessagingUtilities.Encrypt(this.User, this.Channel.AuthorizationServer.Secret); } - this.Signature = CalculateSignature(); + this.Signature = this.CalculateSignature(); } /// <summary> @@ -90,7 +90,7 @@ namespace DotNetOpenAuth.OAuthWrap.ChannelElements { // Decrypt the authorizing username. if (this.User != null) { - // TODO: code here + this.User = MessagingUtilities.Decrypt(this.User, this.Channel.AuthorizationServer.Secret); } } @@ -100,7 +100,7 @@ namespace DotNetOpenAuth.OAuthWrap.ChannelElements { Contract.Ensures(Contract.Result<VerificationCode>() != null); // Construct a new instance of this type. - VerificationCode self = new VerificationCode(channel); + var self = new VerificationCode(channel); var fields = channel.MessageDescriptions.GetAccessor(self); // Deserialize into this newly created instance. |