LCOV - code coverage report
Current view: top level - Cqrs/Authentication - WebSingleSignOnTokenValueHelper.cs Hit Total Coverage
Test: doc-coverage.info Lines: 0 6 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 System;
      10             : using System.Web;
      11             : 
      12             : namespace Cqrs.Authentication
      13             : {
      14             :         [Obsolete("Use SingleSignOnTokenValueHelper.")]
      15             :         public class WebSingleSignOnTokenValueHelper
      16             :                 : IAuthenticationTokenHelper<ISingleSignOnToken>
      17             :                 , IAuthenticationTokenHelper<ISingleSignOnTokenWithUserRsn>
      18             :                 , IAuthenticationTokenHelper<ISingleSignOnTokenWithCompanyRsn>
      19             :                 , IAuthenticationTokenHelper<ISingleSignOnTokenWithUserRsnAndCompanyRsn>
      20           0 :         {
      21             :                 private const string CallContextPermissionScopeValueKey = "SingleSignOnTokenValue";
      22             : 
      23             :                 #region Implementation of IAuthenticationTokenHelper<out ISingleSignOnToken>
      24             : 
      25           0 :                 public ISingleSignOnToken GetAuthenticationToken()
      26             :                 {
      27             :                         return (ISingleSignOnToken)HttpContext.Current.Items[CallContextPermissionScopeValueKey];
      28             :                 }
      29             : 
      30           0 :                 public ISingleSignOnTokenWithUserRsnAndCompanyRsn SetAuthenticationToken(ISingleSignOnTokenWithUserRsnAndCompanyRsn token)
      31             :                 {
      32             :                         SetAuthenticationToken((ISingleSignOnToken)token);
      33             :                         return token;
      34             :                 }
      35             : 
      36           0 :                 public ISingleSignOnTokenWithCompanyRsn SetAuthenticationToken(ISingleSignOnTokenWithCompanyRsn token)
      37             :                 {
      38             :                         SetAuthenticationToken((ISingleSignOnToken)token);
      39             :                         return token;
      40             :                 }
      41             : 
      42           0 :                 public ISingleSignOnTokenWithUserRsn SetAuthenticationToken(ISingleSignOnTokenWithUserRsn token)
      43             :                 {
      44             :                         SetAuthenticationToken((ISingleSignOnToken)token);
      45             :                         return token;
      46             :                 }
      47             : 
      48           0 :                 public ISingleSignOnToken SetAuthenticationToken(ISingleSignOnToken token)
      49             :                 {
      50             :                         HttpContext.Current.Items[CallContextPermissionScopeValueKey] = token;
      51             :                         return token;
      52             :                 }
      53             : 
      54             :                 #endregion
      55             : 
      56             :                 ISingleSignOnTokenWithUserRsn IAuthenticationTokenHelper<ISingleSignOnTokenWithUserRsn>.GetAuthenticationToken()
      57             :                 {
      58             :                         return (ISingleSignOnTokenWithUserRsn)HttpContext.Current.Items[CallContextPermissionScopeValueKey];
      59             :                 }
      60             : 
      61             :                 ISingleSignOnTokenWithCompanyRsn IAuthenticationTokenHelper<ISingleSignOnTokenWithCompanyRsn>.GetAuthenticationToken()
      62             :                 {
      63             :                         return (ISingleSignOnTokenWithCompanyRsn)HttpContext.Current.Items[CallContextPermissionScopeValueKey];
      64             :                 }
      65             : 
      66             :                 ISingleSignOnTokenWithUserRsnAndCompanyRsn IAuthenticationTokenHelper<ISingleSignOnTokenWithUserRsnAndCompanyRsn>.GetAuthenticationToken()
      67             :                 {
      68             :                         return (ISingleSignOnTokenWithUserRsnAndCompanyRsn)HttpContext.Current.Items[CallContextPermissionScopeValueKey];
      69             :                 }
      70             :         }
      71             : }

Generated by: LCOV version 1.10