예제 #1
0
		public GenericXmlSecurityToken ToObject (NativeInfocardCryptoHandle proofTokenHandle, SecurityTokenSerializer serializer)
		{
			XmlDocument doc = new XmlDocument ();
			doc.LoadXml (xml_token);
			XmlElement token = doc.DocumentElement;
			SecurityToken proof = new CardSpaceProofToken (DateTime.FromFileTime (proofTokenHandle.Expiration), proofTokenHandle.GetAsymmetricKey ());

			DateTime effective = DateTime.FromFileTime (created);
			DateTime expiration = DateTime.FromFileTime (expired);

			SecurityKeyIdentifierClause intref =
				serializer.ReadKeyIdentifierClause (Create (internal_ref));
			SecurityKeyIdentifierClause extref =
				serializer.ReadKeyIdentifierClause (Create (external_ref));
			return new GenericXmlSecurityToken (token, proof, effective, expiration, intref, extref, null);
		}
예제 #2
0
        public GenericXmlSecurityToken ToObject(NativeInfocardCryptoHandle proofTokenHandle, SecurityTokenSerializer serializer)
        {
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(xml_token);
            XmlElement    token = doc.DocumentElement;
            SecurityToken proof = new CardSpaceProofToken(DateTime.FromFileTime(proofTokenHandle.Expiration), proofTokenHandle.GetAsymmetricKey());

            DateTime effective  = DateTime.FromFileTime(created);
            DateTime expiration = DateTime.FromFileTime(expired);

            SecurityKeyIdentifierClause intref =
                serializer.ReadKeyIdentifierClause(Create(internal_ref));
            SecurityKeyIdentifierClause extref =
                serializer.ReadKeyIdentifierClause(Create(external_ref));

            return(new GenericXmlSecurityToken(token, proof, effective, expiration, intref, extref, null));
        }