HtmlWidgetHelpers.ValidateSecurityPolicy 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.
Validates that external references in widget HTML are covered by the declared security policy. Returns a list of warnings for any references to origins not present in the appropriate policy field.
public static System.Collections.Generic.IList<Microsoft.Teams.Apps.HtmlWidget.SecurityPolicyWarning> ValidateSecurityPolicy(string html, Microsoft.Teams.Apps.HtmlWidget.HtmlWidgetSecurityPolicy policy);
static member ValidateSecurityPolicy : string * Microsoft.Teams.Apps.HtmlWidget.HtmlWidgetSecurityPolicy -> System.Collections.Generic.IList<Microsoft.Teams.Apps.HtmlWidget.SecurityPolicyWarning>
Public Shared Function ValidateSecurityPolicy (html As String, policy As HtmlWidgetSecurityPolicy) As IList(Of SecurityPolicyWarning)
Parameters
- html
- String
The raw HTML content of the widget.
- policy
- HtmlWidgetSecurityPolicy
The security policy to validate against.
Returns
A list of warnings. Empty list means no issues found.