Class JsonPageTask
- java.lang.Object
- 
- com.ibm.security.access.extension.authn.task.JsonPageTask
 
- 
- All Implemented Interfaces:
- AuthenticationMechanismResultTask
 - Direct Known Subclasses:
- JsonPageAbortTask,- JsonPagePauseTask
 
 public abstract class JsonPageTask extends java.lang.Object implements AuthenticationMechanismResultTask This class represents a task that returns an JSON page.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringEMPTY_JSONstatic intHTTP_BAD_REQUESTstatic intHTTP_NOT_IMPLEMENTEDstatic intHTTP_OKstatic intHTTP_OK_CREATEDstatic intHTTP_OK_NO_CONTENTstatic intHTTP_SERVICE_UNAVALIABLE
 - 
Constructor SummaryConstructors Constructor Description JsonPageTask()Create an JSON page task.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(AuthenticationMechanismContext context)This method is invoked by authentication service when it processes the authentication result.java.lang.StringgetMacro(java.lang.String name)Get the value of the JSON page macro with the specified name.java.util.Map<java.lang.String,java.lang.String>getMacros()Get the JSON page macro set.java.lang.StringgetPageContent()Get the content of the JSON page.java.lang.StringgetPageId()Get the identifier of the JSON page.java.lang.IntegergetStatusCode()Get the current status code of the return taskvoidsetMacro(java.lang.String name, java.lang.String value)Set the value of the JSON page macro with the specified name with the specified value.voidsetMacro(java.lang.String name, JsonValue value)Set the value of the JSON page macro with the specified name with the specified value.voidsetMacros(java.util.Map<java.lang.String,java.lang.String> macros)Set the JSON page macro set.voidsetPageContent(java.lang.String jsonString)Set the content of the JSON page.voidsetPageContent(JsonObject json)Set the content of the JSON page.voidsetPageId(java.lang.String pageId)Set the identifier of the JSON page.voidsetStatusCode(int code)Set the HTTP stataus code returned to the user
 
- 
- 
- 
Field Detail- 
EMPTY_JSONpublic static final java.lang.String EMPTY_JSON - See Also:
- Constant Field Values
 
 - 
HTTP_OKpublic static int HTTP_OK 
 - 
HTTP_OK_CREATEDpublic static int HTTP_OK_CREATED 
 - 
HTTP_OK_NO_CONTENTpublic static int HTTP_OK_NO_CONTENT 
 - 
HTTP_BAD_REQUESTpublic static int HTTP_BAD_REQUEST 
 - 
HTTP_NOT_IMPLEMENTEDpublic static int HTTP_NOT_IMPLEMENTED 
 - 
HTTP_SERVICE_UNAVALIABLEpublic static int HTTP_SERVICE_UNAVALIABLE 
 
- 
 - 
Method Detail- 
getPageIdpublic java.lang.String getPageId() Get the identifier of the JSON page.- Returns:
- The identifier.
 
 - 
setPageIdpublic void setPageId(java.lang.String pageId) Set the identifier of the JSON page.- Parameters:
- pageId- The identifier.
 
 - 
getPageContentpublic java.lang.String getPageContent() Get the content of the JSON page.- Returns:
- The content.
 
 - 
setPageContentpublic void setPageContent(java.lang.String jsonString) Set the content of the JSON page. This MUST be a valid json string.- Parameters:
- pageContent- The content.
 
 - 
setPageContentpublic void setPageContent(JsonObject json) Set the content of the JSON page.- Parameters:
- pageContent- The content.
 
 - 
getMacrospublic java.util.Map<java.lang.String,java.lang.String> getMacros() Get the JSON page macro set.- Returns:
- The macro set.
 
 - 
setMacrospublic void setMacros(java.util.Map<java.lang.String,java.lang.String> macros) Set the JSON page macro set.- Parameters:
- macros- The macro set.
 
 - 
getMacropublic java.lang.String getMacro(java.lang.String name) Get the value of the JSON page macro with the specified name.- Parameters:
- name- The name.
- Returns:
- The value.
 
 - 
setMacropublic void setMacro(java.lang.String name, java.lang.String value)Set the value of the JSON page macro with the specified name with the specified value.- Parameters:
- name- The name.
- value- The value.
 
 - 
setMacropublic void setMacro(java.lang.String name, JsonValue value)Set the value of the JSON page macro with the specified name with the specified value.- Parameters:
- name- The name.
- value- The value.
 
 - 
setStatusCodepublic void setStatusCode(int code) Set the HTTP stataus code returned to the user- Parameters:
- code- HTTP status code to set
 
 - 
getStatusCodepublic java.lang.Integer getStatusCode() Get the current status code of the return task- Returns:
- HTTP status code
 
 - 
executepublic void execute(AuthenticationMechanismContext context) Description copied from interface:AuthenticationMechanismResultTaskThis method is invoked by authentication service when it processes the authentication result. Authentication service passes the specified authentication context.- Specified by:
- executein interface- AuthenticationMechanismResultTask
- Parameters:
- context- The authentication context.
 
 
- 
 
-