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.ComponentModel.DataAnnotations;
11 : using System.Runtime.Serialization;
12 : using Cqrs.DataStores;
13 :
14 : namespace Cqrs.Authentication
15 : {
16 : /// <summary>
17 : /// This is a <see cref="ISingleSignOnToken"/> that includes an identifiable <see cref="UserRsn"/> to optimise the hits of the <see cref="IDataStore{TData}">DataStores</see> by including data you most likely need.
18 : /// As such, if not used correctly, this can expose identifiable information.
19 : /// It is suggested the service layer populates this before sending commands as part of authorisation/authentication.
20 : /// </summary>
21 : public class SingleSignOnTokenWithUserRsn : SingleSignOnToken
22 1 : {
23 : /// <summary>
24 : /// The Rsn of the user doing the operation. When used by an external 3rd party this is the person being impersonated, not the 3rd party system itself.
25 : /// </summary>
26 : [Required]
27 : [DataMember]
28 : Guid UserRsn { get; set; }
29 :
30 0 : public override string Serialise()
31 : {
32 : return UserRsn.ToString("N");
33 : }
34 : }
35 : }
|