Share via


AuthorizationBuilder.SetDefaultPolicy(AuthorizationPolicy) Method

Definition

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

Returns

The builder.

Remarks

The default policy used when evaluating IAuthorizeData with no policy name specified.

Applies to