Apache.Shiro.Authz.Aop.UserAttributeHandler.AssertAuthorized C# (CSharp) Method

AssertAuthorized() public method

public AssertAuthorized ( Attribute attribute ) : void
attribute System.Attribute
return void
        public override void AssertAuthorized(Attribute attribute)
        {
            if (attribute is RequiresUserAttribute && GetSubject().Principal == null)
            {
                throw new UnauthenticatedException("Attempting to perform a user-only operation. The current Subject is " +
                    "not a user (they haven't been authenticated or remembered from a previous login). Access denied.");
            }
        }