fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/user/LoginClient.java
public AppRequestToken login(
            String usernameParam, String passwordParam, Long sessionLifespanSecondsParam) {
        if (this.isEmpty(usernameParam) || this.isEmpty(passwordParam)) {
            throw new FluidClientException(
                    "Username and Password required.",
                    FluidClientException.ErrorCode.FIELD_VALIDATE);
        }

        AuthRequest authRequest = new AuthRequest();

        authRequest.setUsername(usernameParam);
        authRequest.setLifetime(sessionLifespanSecondsParam);

        //Init the session...
        //Init the session to get the salt...
        AuthResponse authResponse;
        try {
            authResponse = new AuthResponse(
                    this.postJson(
                            true,
                            authRequest,
                            WS.Path.User.Version1.userInitSession()));
        }
        //JSON format problem...
        catch (JSONException jsonException) {
            throw new FluidClientException(
                    jsonException.getMessage(),jsonException,FluidClientException.ErrorCode.JSON_PARSING);
        }

        AuthEncryptedData authEncData =
                this.initializeSession(passwordParam, authResponse);

        //Issue the token...
        AppRequestToken appReqToken = this.issueAppRequestToken(
                authResponse.getServiceTicketBase64(),
                usernameParam, authEncData);

        appReqToken.setRoleString(authEncData.getRoleListing());
        appReqToken.setSalt(authResponse.getSalt());

        return appReqToken;
    }
public AppRequestToken login(
            String usernameParam, String passwordParam, Long sessionLifespanSecondsParam) {
        if (this.isEmpty(usernameParam) || this.isEmpty(passwordParam)) {
            throw new FluidClientException(
                    "Username and Password required.",
                    FluidClientException.ErrorCode.FIELD_VALIDATE);
        }

        AuthRequest authRequest = new AuthRequest();

        authRequest.setUsername(usernameParam);
        authRequest.setLifetime(sessionLifespanSecondsParam);

        //Init the session...
        //Init the session to get the salt...
        AuthResponse authResponse;
        try {
            authResponse = new AuthResponse(
                    this.postJson(
                            true,
                            authRequest,
                            WS.Path.User.Version1.userInitSession()));
        }
        //JSON format problem...
        catch (JSONException jsonException) {
            throw new FluidClientException(
                    jsonException.getMessage(),jsonException,FluidClientException.ErrorCode.JSON_PARSING);
        }

        AuthEncryptedData authEncData =
                this.initializeSession(passwordParam, authResponse);

        //Issue the token...
        AppRequestToken appReqToken = this.issueAppRequestToken(
                authResponse.getServiceTicketBase64(),
                usernameParam, authEncData);

        appReqToken.setRoleString(authEncData.getRoleListing());
        appReqToken.setSalt(authResponse.getSalt());

        return appReqToken;
    }
Performs the necessary login actions against Fluid.

Please note that the actual password never travels over the wire / connection.

@param usernameParam The users Username.
@param passwordParam The users password.
@param sessionLifespanSecondsParam The requested duration of the session in seconds.
@return Session token.

@see AppRequestToken