public class

LoginTask

extends AbstractBaseTask
java.lang.Object
   ↳ com.microstrategy.web.tasks.AbstractBaseTask
     ↳ com.microstrategy.web.tasks.LoginTask
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

A simple Task that logs a user into an Intelligence Server.

Summary

Constants
String BLOCK_NAME_LOGINTASKDATA The name of the Block that should contain the resulting task response.
String PARAM_NAME_APPLICATION_TYPE The application type making the request.
String PARAM_NAME_AUTH_MODE The name of the authentication mode parameter.
String PARAM_NAME_LOGIN The name of the user ID parameter.
String PARAM_NAME_PASSWORD The name of the password parameter.
String PARAM_NAME_PORT The name of the port parameter.
String PARAM_NAME_PROJECT The name of the project parameter.
String PARAM_NAME_SERVER The name of the server parameter.
String PARAM_NAME_TWO_STEP_VERIFICATION_CODE The name of the two-step verification code parameter
String PROP_NAME_LOGINTASKDATA_NAME The name of the property that holds the user's login name.
String PROP_NAME_LOGINTASKDATA_SESSION_STATE The name of the session ID property in the Block.
[Expand]
Inherited Constants
From class com.microstrategy.web.tasks.AbstractBaseTask
Fields
protected TaskParameterMetadata applicationTypeTaskParam
protected TaskParameterMetadata authModeTaskParam
protected TaskParameterMetadata loginTaskParam
protected TaskParameterMetadata passwordTaskParam
protected TaskParameterMetadata portTaskParam
protected TaskParameterMetadata projectTaskParam
protected TaskParameterMetadata serverTaskParam
protected TaskParameterMetadata tsvCodeTaskParam
[Expand]
Inherited Fields
From class com.microstrategy.web.tasks.AbstractBaseTask
Public Constructors
LoginTask()
Creates a new LoginTask object.
Protected Constructors
LoginTask(String desc)
Public Methods
void processRequest(TaskRequestContext context, TaskOutput taskOutput)
Creates an Intelligence Server session using the information supplied in the request.
Protected Methods
void buildResponse(TaskOutput taskOutput, TaskRequestContext context, WebIServerSession wiss)
void checkAuthParameters(String server, int port, String project, String login, String password, int authMode)
Ensures various authentication parameters are correctly configured, such as validating the server name is not an empty string.
void checkSession(TaskRequestContext context, WebIServerSession wiss)
String configure(Block block, TaskRequestContext context, WebIServerSession wiss)
void configureWebIServerSession(TaskRequestContext context, WebIServerSession wiss, String server, int port, String project, String login, String password, int authMode, String twoStepVerificationCode, String accessToken, String orgID)
void configureWebIServerSession(TaskRequestContext context, WebIServerSession wiss, String server, int port, String project, String login, String password, int authMode)
void configureWebIServerSession(TaskRequestContext context, WebIServerSession wiss, String server, int port, String project, String login, String password, int authMode, String twoStepVerificationCode, String accessToken)
String getAccessToken(TaskRequestContext context)
boolean isAuthModeEnabled(TaskRequestContext context, WebIServerSession session)
[Expand]
Inherited Methods
From class com.microstrategy.web.tasks.AbstractBaseTask
From class java.lang.Object
From interface com.microstrategy.web.tasks.Task

Constants

public static final String BLOCK_NAME_LOGINTASKDATA

The name of the Block that should contain the resulting task response.

Constant Value: "LoginTaskData"

public static final String PARAM_NAME_APPLICATION_TYPE

The application type making the request.

Constant Value: "appType"

public static final String PARAM_NAME_AUTH_MODE

The name of the authentication mode parameter.

Constant Value: "authMode"

public static final String PARAM_NAME_LOGIN

The name of the user ID parameter.

Constant Value: "userid"

public static final String PARAM_NAME_PASSWORD

The name of the password parameter.

Constant Value: "password"

public static final String PARAM_NAME_PORT

The name of the port parameter.

Constant Value: "port"

public static final String PARAM_NAME_PROJECT

The name of the project parameter.

Constant Value: "project"

public static final String PARAM_NAME_SERVER

The name of the server parameter.

Constant Value: "server"

public static final String PARAM_NAME_TWO_STEP_VERIFICATION_CODE

The name of the two-step verification code parameter

Constant Value: "tsvCode"

protected static final String PROP_NAME_LOGINTASKDATA_NAME

The name of the property that holds the user's login name.

Constant Value: "name"

public static final String PROP_NAME_LOGINTASKDATA_SESSION_STATE

The name of the session ID property in the Block.

Constant Value: "sessionState"

Fields

protected TaskParameterMetadata applicationTypeTaskParam

protected TaskParameterMetadata authModeTaskParam

protected TaskParameterMetadata loginTaskParam

protected TaskParameterMetadata passwordTaskParam

protected TaskParameterMetadata portTaskParam

protected TaskParameterMetadata projectTaskParam

protected TaskParameterMetadata serverTaskParam

protected TaskParameterMetadata tsvCodeTaskParam

Public Constructors

public LoginTask ()

Creates a new LoginTask object.

Protected Constructors

protected LoginTask (String desc)

Public Methods

public void processRequest (TaskRequestContext context, TaskOutput taskOutput)

Creates an Intelligence Server session using the information supplied in the request.

Parameters
context The TaskRequestContext object that maintains the state of the request.
taskOutput The TaskOutput that records the contents of the Task response.
Throws
TaskException If the Task is unable to obtain a Block to store the results.
TaskRequestMalformedException If any of the information is incorrect.

Protected Methods

protected void buildResponse (TaskOutput taskOutput, TaskRequestContext context, WebIServerSession wiss)

Throws
TaskException

protected void checkAuthParameters (String server, int port, String project, String login, String password, int authMode)

Ensures various authentication parameters are correctly configured, such as validating the server name is not an empty string.

Throws
TaskException thrown if parameters fails this preliminary authentication check.

protected void checkSession (TaskRequestContext context, WebIServerSession wiss)

Throws
TaskException

protected String configure (Block block, TaskRequestContext context, WebIServerSession wiss)

Throws
TaskException

protected void configureWebIServerSession (TaskRequestContext context, WebIServerSession wiss, String server, int port, String project, String login, String password, int authMode, String twoStepVerificationCode, String accessToken, String orgID)

Throws
TaskException

protected void configureWebIServerSession (TaskRequestContext context, WebIServerSession wiss, String server, int port, String project, String login, String password, int authMode)

Throws
TaskException

protected void configureWebIServerSession (TaskRequestContext context, WebIServerSession wiss, String server, int port, String project, String login, String password, int authMode, String twoStepVerificationCode, String accessToken)

Throws
TaskException

protected String getAccessToken (TaskRequestContext context)

protected boolean isAuthModeEnabled (TaskRequestContext context, WebIServerSession session)

Throws
TaskException