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." }; } }
/// <summary> /// Initializes a new instance of the <see cref="AuthIq"/> class. /// </summary> public AuthIq() { GenerateId(); Auth = new Auth.Auth(); }
public DefaultYZClient(Auth.Auth auth) { this.auth = auth; }