Example #1
0
        protected virtual void RaisePostBackEvent(string eventArgument)
        {
            if (!string.IsNullOrEmpty(this.TokenXml))
            {
                try {
                    ReceivingTokenEventArgs receivingArgs = this.OnReceivingToken(this.TokenXml);

                    if (!receivingArgs.Cancel)
                    {
                        try {
                            Token token = Token.Read(this.TokenXml, this.Audience, receivingArgs.DecryptingTokens);
                            this.OnReceivedToken(token);
                        } catch (InformationCardException ex) {
                            this.OnTokenProcessingError(this.TokenXml, ex);
                        }
                    }
                } catch (XmlException ex) {
                    this.OnTokenProcessingError(this.TokenXml, ex);
                }
            }
        }