Esempio n. 1
0
        /// <summary>
        /// Flattens the claims into a dictionary
        /// </summary>
        protected void FlattenClaims()
        {
            if (null != _claims)
            {
                return;
            }

            _claims = new Dictionary <string, string>();

            foreach (ClaimSet set in _authorizationContext.ClaimSets)
            {
                foreach (Claim claim in set)
                {
                    if (claim.Right == Rights.PossessProperty)
                    {
                        _claims.Add(claim.ClaimType, TokenUtility.GetResourceValue(claim));
                    }
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Token Constructor
 /// </summary>
 /// <param name="xmlToken">Encrypted xml token</param>
 public Token(String xmlToken)
 {
     byte[] decryptedData = XmlEncDecryptor.DecryptToken(xmlToken);
     _authorizationContext = TokenUtility.AuthenticateToken(decryptedData);
 }