AuthorizationBuilder.SetDefaultPolicy(AuthorizationPolicy) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the default authorization policy. Defaults to require authenticated users.
public virtual Microsoft.AspNetCore.Authorization.AuthorizationBuilder SetDefaultPolicy (Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
abstract member SetDefaultPolicy : Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
override this.SetDefaultPolicy : Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
Public Overridable Function SetDefaultPolicy (policy As AuthorizationPolicy) As AuthorizationBuilder
Parameters
- policy
- AuthorizationPolicy
Returns
The builder.
Remarks
The default policy used when evaluating IAuthorizeData with no policy name specified.