Class FromAttribute
properties decorated with this attribute will have their values auto bound from the relevant claim of the current user principal. this is a shorter alias for the [FromClaim] attribute.
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.Attributes.dll
Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class FromAttribute : FromClaimAttribute
Constructors
FromAttribute(string, bool)
properties decorated with this attribute will have their values auto bound from the relevant claim of the current user principal. this is a shorter alias for the [FromClaim] attribute.
Declaration
public FromAttribute(string claimType, bool isRequired = true)
Parameters
Type | Name | Description |
---|---|---|
string | claimType | the claim type to auto bind |
bool | isRequired | set to true if a validation error should be thrown when the current user principal doesn't have the specified claim |