LCOV - code coverage report
Current view: top level - Cqrs/Authentication - DefaultAuthenticationTokenHelper.cs Hit Total Coverage
Test: doc-coverage.info Lines: 0 5 0.0 %
Date: 2017-07-26

          Line data    Source code
       1             : #region Copyright
       2             : // // -----------------------------------------------------------------------
       3             : // // <copyright company="cdmdotnet Limited">
       4             : // //   Copyright cdmdotnet Limited. All rights reserved.
       5             : // // </copyright>
       6             : // // -----------------------------------------------------------------------
       7             : #endregion
       8             : 
       9             : using cdmdotnet.StateManagement;
      10             : 
      11             : namespace Cqrs.Authentication
      12             : {
      13             :         public class DefaultAuthenticationTokenHelper
      14             :                 : AuthenticationTokenHelper<SingleSignOnToken>
      15             :                 , IAuthenticationTokenHelper<SingleSignOnTokenWithUserRsn>
      16             :                 , IAuthenticationTokenHelper<SingleSignOnTokenWithCompanyRsn>
      17             :                 , IAuthenticationTokenHelper<SingleSignOnTokenWithUserRsnAndCompanyRsn>
      18           0 :         {
      19             :                 private const string CallContextPermissionScopeValueKey = "SingleSignOnTokenValue";
      20             : 
      21           0 :                 public DefaultAuthenticationTokenHelper(IContextItemCollectionFactory factory)
      22             :                         : base(factory)
      23             :                 {
      24             :                         CacheKey = CallContextPermissionScopeValueKey;
      25             :                 }
      26             : 
      27           0 :                 public SingleSignOnTokenWithUserRsnAndCompanyRsn SetAuthenticationToken(SingleSignOnTokenWithUserRsnAndCompanyRsn token)
      28             :                 {
      29             :                         SetAuthenticationToken((SingleSignOnToken)token);
      30             :                         return token;
      31             :                 }
      32             : 
      33           0 :                 public SingleSignOnTokenWithCompanyRsn SetAuthenticationToken(SingleSignOnTokenWithCompanyRsn token)
      34             :                 {
      35             :                         SetAuthenticationToken((SingleSignOnToken)token);
      36             :                         return token;
      37             :                 }
      38             : 
      39           0 :                 public SingleSignOnTokenWithUserRsn SetAuthenticationToken(SingleSignOnTokenWithUserRsn token)
      40             :                 {
      41             :                         SetAuthenticationToken((SingleSignOnToken)token);
      42             :                         return token;
      43             :                 }
      44             :         
      45             :                 SingleSignOnTokenWithUserRsn IAuthenticationTokenHelper<SingleSignOnTokenWithUserRsn>.GetAuthenticationToken()
      46             :                 {
      47             :                         return Cache.GetData<SingleSignOnTokenWithUserRsn>(CallContextPermissionScopeValueKey);
      48             :                 }
      49             : 
      50             :                 SingleSignOnTokenWithCompanyRsn IAuthenticationTokenHelper<SingleSignOnTokenWithCompanyRsn>.GetAuthenticationToken()
      51             :                 {
      52             :                         return Cache.GetData<SingleSignOnTokenWithCompanyRsn>(CallContextPermissionScopeValueKey);
      53             :                 }
      54             : 
      55             :                 SingleSignOnTokenWithUserRsnAndCompanyRsn IAuthenticationTokenHelper<SingleSignOnTokenWithUserRsnAndCompanyRsn>.GetAuthenticationToken()
      56             :                 {
      57             :                         return Cache.GetData<SingleSignOnTokenWithUserRsnAndCompanyRsn>(CallContextPermissionScopeValueKey);
      58             :                 }
      59             :         }
      60             : }

Generated by: LCOV version 1.10