Package org.openengsb.core.api.security

Examples of org.openengsb.core.api.security.MessageVerificationFailedException


    private void checkForReplayedMessage(MethodCallMessage request) throws MessageVerificationFailedException {
        String authenticationInfo = request.getPrincipal();
        synchronized (lastMessageTimestamp) {
            try {
                if (lastMessageTimestamp.get(authenticationInfo) >= request.getTimestamp()) {
                    throw new MessageVerificationFailedException(
                        "Message's timestamp was too old. Message with higher timestamp already receiverd."
                                + "Possible replay detected.");
                }
            } catch (ExecutionException e) {
                LOGGER.error("error when accessing cache", e);
View Full Code Here


    private void checkOverallAgeOfRequest(MethodCallMessage request) throws MessageVerificationFailedException {
        long ageInMillis = System.currentTimeMillis() - request.getTimestamp();
        LOGGER.debug("request-age in ms: {}", ageInMillis);
        if (ageInMillis < 0) {
            throw new MessageVerificationFailedException("Message timestamp was too far in the future");
        }
        if (ageInMillis > timeout) {
            throw new MessageVerificationFailedException("Message timestamp is too old.");
        }
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.security.MessageVerificationFailedException

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.