Package org.pac4j.core.exception.http
Class RedirectionActionHelper
- java.lang.Object
-
- org.pac4j.core.exception.http.RedirectionActionHelper
-
public final class RedirectionActionHelper extends Object
Helper to buildRedirectionAction
.- Since:
- 4.0.0
- Author:
- Jerome LELEU
-
-
Constructor Summary
Constructors Constructor Description RedirectionActionHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
buildFormPostContent(WebContext context)
Build a form POST content from the web context.static RedirectionAction
buildFormPostContentAction(WebContext context, String content)
Build the appropriate redirection action for a content which is a form post.static RedirectionAction
buildRedirectUrlAction(WebContext context, String location)
Build the appropriate redirection action for a location.protected static String
escapeHtml(String s)
static boolean
isUseModernHttpCodes()
static void
setUseModernHttpCodes(boolean useModernHttpCodes)
-
-
-
Method Detail
-
buildRedirectUrlAction
public static RedirectionAction buildRedirectUrlAction(WebContext context, String location)
Build the appropriate redirection action for a location.- Parameters:
context
- the web contextlocation
- the location- Returns:
- the appropriate redirection action
-
buildFormPostContentAction
public static RedirectionAction buildFormPostContentAction(WebContext context, String content)
Build the appropriate redirection action for a content which is a form post.- Parameters:
context
- the web contextcontent
- the content- Returns:
- the appropriate redirection action
-
buildFormPostContent
public static String buildFormPostContent(WebContext context)
Build a form POST content from the web context.- Parameters:
context
- the web context- Returns:
- the form POST content
-
isUseModernHttpCodes
public static boolean isUseModernHttpCodes()
-
setUseModernHttpCodes
public static void setUseModernHttpCodes(boolean useModernHttpCodes)
-
-