Class PolicyControlledFeature
Feature controlled by Permissions Policy.
Inheritance
Inherited Members
Namespace: Lib.AspNetCore.Security.Http.Headers
Assembly: Lib.AspNetCore.Security.dll
Syntax
public class PolicyControlledFeature
Fields
SelfOrigin
The allow list keyword to match current URL’s origin.
Declaration
public const string SelfOrigin = "self"
Field Value
Type | Description |
---|---|
System.String |
Properties
AllowList
Gets the allowlist (the set of allowed origins) for the feature.
Declaration
public ReadOnlyCollection<string> AllowList { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<System.String> |
FeatureName
Gets the feature name.
Declaration
public string FeatureName { get; }
Property Value
Type | Description |
---|---|
System.String |
IsAllowedForAllOrigins
Indicates if the feature is allowed for all origins.
Declaration
public bool IsAllowedForAllOrigins { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsDeniedForAllOrigins
Indicates if the feature should be disabled for all frames.
Declaration
public bool IsDeniedForAllOrigins { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
CreateAllowedForAllOrigins(String)
Creates a feature which is allowed for all origins.
Declaration
public static PolicyControlledFeature CreateAllowedForAllOrigins(string featureName)
Parameters
Type | Name | Description |
---|---|---|
System.String | featureName | The feature name. |
Returns
Type | Description |
---|---|
PolicyControlledFeature | The feature controlled by Permissions Policy. |
CreateAllowedForAllowList(String, String[])
Creates a feature which is allowed for origins on the allow list.
Declaration
public static PolicyControlledFeature CreateAllowedForAllowList(string featureName, params string[] allowList)
Parameters
Type | Name | Description |
---|---|---|
System.String | featureName | The feature name. |
System.String[] | allowList | The allowlist (the set of allowed origins) for the feature. |
Returns
Type | Description |
---|---|
PolicyControlledFeature | The feature controlled by Permissions Policy. |
CreateDeniedForAllOrigins(String)
Creates a feature which should be disabled for all frames.
Declaration
public static PolicyControlledFeature CreateDeniedForAllOrigins(string featureName)
Parameters
Type | Name | Description |
---|---|---|
System.String | featureName | The feature name. |
Returns
Type | Description |
---|---|
PolicyControlledFeature | The feature controlled by Permissions Policy. |
ToString()
Gets the string representation of the feature policy.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The string representation of the feature policy. |