diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-02-26 16:18:06 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-02-26 16:18:06 +0200 |
| commit | 47691cbb0207d32c7b86113e3c425138907265d9 (patch) | |
| tree | 04ba04cdee8a6c249b5ba04cdb4510e5c8fc872f /Software/Visual_Studio/Web/Tango.MachineService/Security/RefreshTokenEncoder.cs | |
| parent | 4c0b55f75844e9955d19177bc9c11821dcd2b272 (diff) | |
| parent | ecda365478dfce97c5bba25603226bc42e864754 (diff) | |
| download | Tango-47691cbb0207d32c7b86113e3c425138907265d9.tar.gz Tango-47691cbb0207d32c7b86113e3c425138907265d9.zip | |
merge
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Security/RefreshTokenEncoder.cs')
| -rw-r--r-- | Software/Visual_Studio/Web/Tango.MachineService/Security/RefreshTokenEncoder.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Security/RefreshTokenEncoder.cs b/Software/Visual_Studio/Web/Tango.MachineService/Security/RefreshTokenEncoder.cs index 3948ae1c4..896788ffc 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Security/RefreshTokenEncoder.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Security/RefreshTokenEncoder.cs @@ -11,16 +11,16 @@ namespace Tango.MachineService.Security { public String Encode(T obj) { - String str = obj.ToJsonString(); + String json = JsonConvert.SerializeObject(obj); Rfc2898Cryptographer crypt = new Rfc2898Cryptographer(); - return crypt.Encrypt(str); + return crypt.Encrypt(json); } public T Decode(String token) { Rfc2898Cryptographer crypt = new Rfc2898Cryptographer(); - String str = crypt.Decrypt(token); - return JsonConvert.DeserializeObject<T>(str); + String json = crypt.Decrypt(token); + return JsonConvert.DeserializeObject<T>(json); } } }
\ No newline at end of file |
