Package org.apache.ws.security.message.token

Examples of org.apache.ws.security.message.token.Timestamp


       
        // Store the timestamp element
        WSSecurityEngineResult tsResult = WSSecurityUtil.fetchActionResult(results, WSConstants.TS);
        Element timestamp = null;
        if (tsResult != null) {
            Timestamp ts = (Timestamp)tsResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
            timestamp = ts.getElement();
        }
       
        boolean check = true;
       
        SupportingTokenPolicyValidator validator = new ConcreteSupportingTokenPolicyValidator();
View Full Code Here


        Vector wsResult = verify(createdDoc);
        WSSecurityEngineResult actionResult =
            WSSecurityUtil.fetchActionResult(wsResult, WSConstants.TS);
        assertTrue(actionResult != null);
       
        Timestamp receivedTimestamp =
            (Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
        assertTrue(receivedTimestamp != null);

        MyHandler myHandler = new MyHandler();
        if (!myHandler.publicVerifyTimestamp(receivedTimestamp, 300)) {
View Full Code Here

        Vector wsResult = verify(createdDoc);
        WSSecurityEngineResult actionResult =
            WSSecurityUtil.fetchActionResult(wsResult, WSConstants.TS);
        assertTrue(actionResult != null);
       
        Timestamp receivedTimestamp =
            (Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
        assertTrue(receivedTimestamp != null);

        MyHandler myHandler = new MyHandler();
        if (!myHandler.publicVerifyTimestamp(receivedTimestamp, 300)) {
View Full Code Here

        Vector wsResult = verify(createdDoc);
        WSSecurityEngineResult actionResult =
            WSSecurityUtil.fetchActionResult(wsResult, WSConstants.TS);
        assertTrue(actionResult != null);
       
        Timestamp receivedTimestamp =
            (Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
        assertTrue(receivedTimestamp != null);

        MyHandler myHandler = new MyHandler();
        if (myHandler.publicVerifyTimestamp(receivedTimestamp, -1)) {
View Full Code Here

        Vector wsResult = verify(doc);
        WSSecurityEngineResult actionResult =
            WSSecurityUtil.fetchActionResult(wsResult, WSConstants.TS);
        assertTrue(actionResult != null);
       
        Timestamp receivedTimestamp =
            (Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
        assertTrue(receivedTimestamp != null);
       
        MyHandler myHandler = new MyHandler();
        if (myHandler.publicVerifyTimestamp(receivedTimestamp, 300, 0)) {
View Full Code Here

        // Extract the timestamp action result from the action vector
        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.TS);

        if (actionResult != null) {
            Timestamp timestamp = (Timestamp) actionResult
                    .get(WSSecurityEngineResult.TAG_TIMESTAMP);

            if (timestamp != null) {
                if (!verifyTimestamp(timestamp, rmd)) {
                    throw new RampartException("cannotValidateTimestamp");
View Full Code Here

        }
        wssConfig = wsc;
        /*
         * Decode Timestamp, add the found time (created/expiry) to result
         */
        Timestamp timestamp = new Timestamp((Element) elem);
        handleTimestamp(timestamp);
        returnResults.add(0,
                new WSSecurityEngineResult(WSConstants.TS,
                        timestamp));
        tsId = elem.getAttributeNS(WSConstants.WSU_NS, "Id");
View Full Code Here

     * @param doc
     *            The SOAP enevlope as W3C document
     */
    public void prepare(Document doc) {
        document = doc;
        ts = new Timestamp(wssConfig.isPrecisionInMilliSeconds(), doc,
                timeToLive);
        String tsId = "Timestamp-" + ts.hashCode();
        ts.setID(tsId);
    }
View Full Code Here

       
        // Store the timestamp element
        WSSecurityEngineResult tsResult = WSSecurityUtil.fetchActionResult(results, WSConstants.TS);
        Element timestamp = null;
        if (tsResult != null) {
            Timestamp ts = (Timestamp)tsResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
            timestamp = ts.getElement();
        }
       
        boolean check = true;
       
        SupportingTokenPolicyValidator validator = new ConcreteSupportingTokenPolicyValidator();
View Full Code Here

        // Extract the timestamp action result from the action vector
        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.TS);

        if (actionResult != null) {
            Timestamp timestamp = (Timestamp) actionResult
                    .get(WSSecurityEngineResult.TAG_TIMESTAMP);

            if (timestamp != null) {
                if (!verifyTimestamp(timestamp, rmd)) {
                    throw new RampartException("cannotValidateTimestamp");
View Full Code Here

TOP

Related Classes of org.apache.ws.security.message.token.Timestamp

Copyright © 2018 www.massapicom. 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.