Package org.uberfire.ext.security.server
Class SecureHeadersConfig
- java.lang.Object
-
- org.uberfire.ext.security.server.SecureHeadersConfig
-
public class SecureHeadersConfig extends Object
HTTP headers related to security For example: HSTS and Clickjacking mitigation supportNote: This implementation has been borrowed from Aerogear Security.
-
-
Constructor Summary
Constructors Constructor Description SecureHeadersConfig(javax.servlet.FilterConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFrameOptions()Allows a secure web page from host B to declare that its content (for example a button, links, text, etc.) must not be displayed in a frame ( or ) of another page (e.g.StringgetLocation()Retrieve the Location headerStringgetMaxAge()Specifies the number of seconds, after the reception of the STS header fieldStringgetXssOptions()booleanhasFrameOptions()Verify if "x-frame-options" is presentbooleanhasLocation()Verify if the option "Location" is presentbooleanhasMaxAge()Verify if the option "max-age" is presentbooleanhasXSSOptions()Verify if "x-xss-protection" is present
-
-
-
Method Detail
-
getMaxAge
public String getMaxAge()
Specifies the number of seconds, after the reception of the STS header field- Returns:
- max-age directive
- See Also:
- The max-age Directive
-
getLocation
public String getLocation()
Retrieve the Location header- Returns:
- Location header field value
- See Also:
- HTTP Request Type
-
getFrameOptions
public String getFrameOptions()
Allows a secure web page from host B to declare that its content (for example a button, links, text, etc.) must not be displayed in a frame ( or- Returns:
- X-Frame-Options HTTP header field
- See Also:
- X-Frame-Options
-
hasMaxAge
public boolean hasMaxAge()
Verify if the option "max-age" is present- Returns:
- boolean
-
hasLocation
public boolean hasLocation()
Verify if the option "Location" is present- Returns:
- boolean
-
hasFrameOptions
public boolean hasFrameOptions()
Verify if "x-frame-options" is present- Returns:
- boolean
-
hasXSSOptions
public boolean hasXSSOptions()
Verify if "x-xss-protection" is present- Returns:
- boolean
-
getXssOptions
public String getXssOptions()
-
-