0

I want to put something like [isAuthenticate] at the beginning of the controller page, like the [Authorize] attribute or I want it to login to the page when it returns the answer "is authenticated" true . is there any way like this?

 [Authorize]
 public class HomeController : Controller
 {

I want to put something like this

[isAuthenticated]
public class HomeController : Controller
{
1
  • Within this [isAuthenticated] filter what do you want to do? Commented Oct 26, 2022 at 2:18

1 Answer 1

1

You can check this site and can create your custom attributes.

https://learn.microsoft.com/en-us/dotnet/standard/attributes/writing-custom-attributes

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.