Example #1
0
        /// <summary>
        /// Establish a secure session
        /// </summary>
        /// <returns></returns>
        public SecureChannelMessage <ClientSessionInfo> InitSession(Instant instant)
        {
            SecureSession     session = SecureSession.Get(HttpContext, instant);
            ClientSessionInfo result  = GetClientSessionInfo(session);

            SetSessionCookie(session);

            return(new SecureChannelMessage <ClientSessionInfo>(result));
        }
Example #2
0
        public override bool Equals(object obj)
        {
            ClientSessionInfo info = obj as ClientSessionInfo;

            if (info != null)
            {
                return(info.SessionId == SessionId && info.ClientIdentifier.Equals(ClientIdentifier) && info.PublicKey.Equals(PublicKey));
            }
            return(base.Equals(obj));
        }
Example #3
0
        internal static ClientSessionInfo GetClientSessionInfo(SecureSession session)
        {
            ClientSessionInfo result = new ClientSessionInfo()
            {
                SessionId        = session.Id.Value,
                ClientIdentifier = session.Identifier,
                PublicKey        = session.PublicKey
            };

            return(result);
        }
 public override string ToString()
 {
     return($"{ClientSessionInfo.ToString()}::SessionCookie={SessionCookie.ToString()};SessionKey=XXX;SessionIV=XXX");
 }