SapphireDb logo SapphireDb

Execute - Authentication/Authorization

You can use the [ActionAuth]-Attribute to control the permission of a user to execute a specific action.

Usage

The [ActionAuth]-Attribute can be used on the action handler class or a single action

Every auth-attribute can be used in three ways.
  1. Without attributes: Authentication required
  2. Policies: A comma separated string of policy-names. All policies have to succeed. Check out Policies for more details
  3. Function name: You can optionally pass the name of a function in the class that has to return a boolean. The function will get executed to check if the user is allowed for the action.

The usage equals the usage of the [QueryAuth]-Attribute. Check out the Documentation for Query

This website uses Google Analytics. If you want to disable it just unselect the option: