public void OnAuthorization(AuthorizationFilterContext context)
        {
            _auth = (Auth.Auth)context.HttpContext.RequestServices.GetService(typeof(Auth.Auth));
            Client client = _auth.User();

            if (client == null)
            {
                context.Result = new ContentResult()
                {
                    Content = "Acesso negado."
                };
            }
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthIq"/> class.
 /// </summary>
 public AuthIq()
 {
     GenerateId();
     Auth = new Auth.Auth();
 }
示例#3
0
 public DefaultYZClient(Auth.Auth auth)
 {
     this.auth = auth;
 }