예제 #1
0
        public ISecurityContext GetCreateContext()
        {
            ISecurityContext securityContext = Context;

            if (securityContext == null)
            {
                securityContext = new SecurityContextImpl(this);
                contextTL.Value = securityContext;
            }
            return(securityContext);
        }
예제 #2
0
        public Object CreateForkedValue(Object value)
        {
            if (value == null)
            {
                return(null);
            }
            SecurityContextImpl original    = (SecurityContextImpl)value;
            SecurityContextImpl forkedValue = new SecurityContextImpl(original.SecurityContextHolder);

            forkedValue.Authentication = original.Authentication;
            forkedValue.Authorization  = original.Authorization;
            return(forkedValue);
        }