コード例 #1
0
        public void ResetPrincipalFromTicketIfExists()
        {
            if (FieldReportingPrincipal.CurrentPrincipal != null)
            {
                return;
            }

            var ticket = GetCurrentAuthenticationTicket();

            if (ticket != null)
            {
                var userName = ticket.Name;

                var principal = new FieldReportingPrincipalFactory().CreatePrincipal(userName);

                FieldReportingPrincipal.CurrentPrincipal = principal;
            }
        }
コード例 #2
0
        public void ResetPrincipalFromTicketIfExists()
        {
            if (FieldReportingPrincipal.CurrentPrincipal != null)
            {
                return;
            }

            var ticket = GetCurrentAuthenticationTicket();

            if (ticket != null)
            {
                var userName = ticket.Name;

                var principal = new FieldReportingPrincipalFactory().CreatePrincipal(userName);

                FieldReportingPrincipal.CurrentPrincipal = principal;
            }
        }