Class JsonPageTask
java.lang.Object
com.ibm.security.access.extension.authn.task.JsonPageTask
- All Implemented Interfaces:
AuthenticationMechanismResultTask
- Direct Known Subclasses:
JsonPageAbortTask
,JsonPagePauseTask
This class represents a task that returns an JSON page.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static int
static int
static int
static int
static int
static int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(AuthenticationMechanismContext context) This method is invoked by authentication service when it processes the authentication result.Get the value of the JSON page macro with the specified name.Get the JSON page macro set.Get the content of the JSON page.Get the identifier of the JSON page.Get the current status code of the return taskvoid
Set the value of the JSON page macro with the specified name with the specified value.void
Set the value of the JSON page macro with the specified name with the specified value.void
Set the JSON page macro set.void
setPageContent
(String jsonString) Set the content of the JSON page.void
setPageContent
(JsonObject json) Set the content of the JSON page.void
Set the identifier of the JSON page.void
setStatusCode
(int code) Set the HTTP stataus code returned to the user
-
Field Details
-
EMPTY_JSON
- See Also:
-
HTTP_OK
public static int HTTP_OK -
HTTP_OK_CREATED
public static int HTTP_OK_CREATED -
HTTP_OK_NO_CONTENT
public static int HTTP_OK_NO_CONTENT -
HTTP_BAD_REQUEST
public static int HTTP_BAD_REQUEST -
HTTP_NOT_IMPLEMENTED
public static int HTTP_NOT_IMPLEMENTED -
HTTP_SERVICE_UNAVALIABLE
public static int HTTP_SERVICE_UNAVALIABLE
-
-
Constructor Details
-
JsonPageTask
public JsonPageTask()Create an JSON page task.
-
-
Method Details
-
getPageId
Get the identifier of the JSON page.- Returns:
- The identifier.
-
setPageId
Set the identifier of the JSON page.- Parameters:
pageId
- The identifier.
-
getPageContent
Get the content of the JSON page.- Returns:
- The content.
-
setPageContent
Set the content of the JSON page. This MUST be a valid json string.- Parameters:
pageContent
- The content.
-
setPageContent
public void setPageContent(JsonObject json) Set the content of the JSON page.- Parameters:
pageContent
- The content.
-
getMacros
Get the JSON page macro set.- Returns:
- The macro set.
-
setMacros
Set the JSON page macro set.- Parameters:
macros
- The macro set.
-
getMacro
Get the value of the JSON page macro with the specified name.- Parameters:
name
- The name.- Returns:
- The value.
-
setMacro
Set the value of the JSON page macro with the specified name with the specified value.- Parameters:
name
- The name.value
- The value.
-
setMacro
Set the value of the JSON page macro with the specified name with the specified value.- Parameters:
name
- The name.value
- The value.
-
setStatusCode
public void setStatusCode(int code) Set the HTTP stataus code returned to the user- Parameters:
code
- HTTP status code to set
-
getStatusCode
Get the current status code of the return task- Returns:
- HTTP status code
-
execute
Description copied from interface:AuthenticationMechanismResultTask
This method is invoked by authentication service when it processes the authentication result. Authentication service passes the specified authentication context.- Specified by:
execute
in interfaceAuthenticationMechanismResultTask
- Parameters:
context
- The authentication context.
-