|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.2) Part Number E27170-01 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.servlet.security.Utils
public class Utils
Constructor Summary | |
---|---|
Utils()
|
Method Summary | |
---|---|
static String |
encodeXSS(String text)
This helper method can be used to help prevent Cross Site Scripting vulnerabilities. |
static String |
getConfiguredAuthMethod(HttpServletRequest request)
Returns the auth-method as configured in web.xml for the webapp |
static String |
getConfiguredAuthMethod(ServletContext servletContext)
Returns the auth-method as configured in web.xml for the webapp |
static boolean |
isSSLRequired(HttpServletRequest request)
Checks whether SSL is required for the current request as per the security-constraints defined in the deployment descriptors. |
static boolean |
isSSLRequired(ServletContext servletContext,
String relativeURI,
String method)
Checks whether SSL is required for the given URI and method as per the security-constraints defined in the deployment descriptors. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static String encodeXSS(String text)
A full description of Cross Site Scripting (XSS) vulnerabilities can be found at http://www.cert.org/tech_tips/malicious_code_mitigation.html.
text
- This is the dynamic text which is going to be sent as html (eg.
URL)
public static String getConfiguredAuthMethod(ServletContext servletContext)
servletContext
- javax.servlet.ServletContext
public static String getConfiguredAuthMethod(HttpServletRequest request)
request
- HttpServletRequest
public static boolean isSSLRequired(ServletContext servletContext, String relativeURI, String method)
servletContext
- javax.servlet.ServletContextrelativeURI
- : should not include the context pathmethod
- : GET/POST/PUT etc for which the check is desired
public static boolean isSSLRequired(HttpServletRequest request)
request
-
|
Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.2) Part Number E27170-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |