Package org.intalio.tempo.security.ws

Examples of org.intalio.tempo.security.ws.TokenClient.authenticateUser()


    private void runAbsenceRequest(String paramUser, String paramPassword, HashMap pipa, HashMap complete) throws Exception {
        _log.info("Instanciate token service client");
        TokenClient client = new TokenClient(TOKEN_SERVICE);

        _log.info("We are trying to authenticate as user:" + paramUser + " with password:" + paramPassword);
        String token = client.authenticateUser(paramUser, paramPassword);
       
        _log.info("We have gained a token from the token service. We can use it to call authenticated tempo services");
        Property[] props = client.getTokenProperties(token);
        String user = (String) PropertyUtils.getProperty(props, AuthenticationConstants.PROPERTY_USER).getValue();
        _log.info("Decrypting the token properties. We have successfully logged in as:" + user);
View Full Code Here


                    throws Exception {
        _log.info("Running absence request with optional call to:" + optionalCall);

        _log.info("Get the token client and authenticate");
        TokenClient client = new TokenClient(TOKEN_SERVICE);
        String token = client.authenticateUser(paramUser, paramPassword);

        _log.info("get the tms client");
        //RemoteTMSClient tms = new RemoteTMSClient(TMS_SERVICE, token);
        TempoClient tempoClient = new TempoClient("http://localhost:8080", token, client);
       
View Full Code Here

    /**
     * This is to check, we have no problems completing the task after numerous (possibly conflicting) CLAIM/REVOKE requests
     */
    private void runAbsenceRequestWithRandomClaimRevokeTMPCalls(String paramUser, String paramPassword, HashMap pipa, HashMap complete) throws Exception {
        TokenClient client = new TokenClient(TOKEN_SERVICE);
        String token = client.authenticateUser(paramUser, paramPassword);
        //RemoteTMSClient tms = new RemoteTMSClient(TMS_SERVICE, token);
        TempoClient tempoClient = new TempoClient("http://localhost:8080", token, client);
        Task[] ts = tempoClient.getAvailableTasks("PIPATask", "T._description like '%Examples%'");
        String pipaID = ts[0].getID();
        tempoClient.init(pipaID, tempoClient.createMessageAsDocument(pipa, "abr_initPipa.ftl"));
View Full Code Here

    String paramUser = "admin";
    String paramPassword = "changeit";
   
    // prepare the token
    TokenClient client = new TokenClient(TOKEN_SERVICE);
    String token = client.authenticateUser(paramUser, paramPassword);
    // testing client, including call to TMS, TMP
    TempoClient tempoClient = new TempoClient("http://localhost:8080", token, client);

   
    // search PIPA tasks using wild card description
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.