Package org.apache.cxf.sts.token.canceller

Examples of org.apache.cxf.sts.token.canceller.TokenCancellerResponse


            }
           
            //
            // Cancel token
            //
            TokenCancellerResponse tokenResponse = null;
            for (TokenCanceller tokenCanceller : tokencancellers) {
                if (tokenCanceller.canHandleToken(cancelTarget)) {
                    try {
                        tokenResponse = tokenCanceller.cancelToken(cancellerParameters);
                    } catch (RuntimeException ex) {
                        LOG.log(Level.WARNING, "", ex);
                        throw new STSException(
                            "Error while cancelling a token", ex, STSException.REQUEST_FAILED
                        );
                    }
                    break;
                }
            }
            if (tokenResponse == null || tokenResponse.getToken() == null) {
                LOG.fine("No Token Canceller has been found that can handle this token");
                throw new STSException(
                    "No token canceller found for requested token type: "
                    + tokenRequirements.getTokenType(),
                    STSException.REQUEST_FAILED
                );
            }
           
            if (tokenResponse.getToken().getState() != STATE.CANCELLED) {
                LOG.log(Level.WARNING, "Token cancellation failed.");
                throw new STSException("Token cancellation failed.");
            }
           
            // prepare response
View Full Code Here


        cancellerParameters.setTokenRequirements(tokenRequirements);  
       
        //
        // Cancel token
        //
        TokenCancellerResponse tokenResponse = null;
        for (TokenCanceller tokenCanceller : tokencancellers) {
            if (tokenCanceller.canHandleToken(cancelTarget)) {
                try {
                    tokenResponse = tokenCanceller.cancelToken(cancellerParameters);
                } catch (RuntimeException ex) {
                    LOG.log(Level.WARNING, "", ex);
                    throw new STSException(
                        "Error while cancelling a token", ex, STSException.REQUEST_FAILED
                    );
                }
                break;
            }
        }
        if (tokenResponse == null) {
            LOG.fine("No Token Canceller has been found that can handle this token");
            throw new STSException(
                "No token canceller found for requested token type: "
                + tokenRequirements.getTokenType(),
                STSException.REQUEST_FAILED
            );
        }
       
        if (!tokenResponse.isTokenCancelled()) {
            LOG.log(Level.WARNING, "Token cancellation failed.");
            throw new STSException("Token cancellation failed.");
        }
       
        // prepare response
View Full Code Here

            }
           
            //
            // Cancel token
            //
            TokenCancellerResponse tokenResponse = null;
            for (TokenCanceller tokenCanceller : tokencancellers) {
                if (tokenCanceller.canHandleToken(cancelTarget)) {
                    try {
                        tokenResponse = tokenCanceller.cancelToken(cancellerParameters);
                    } catch (RuntimeException ex) {
                        LOG.log(Level.WARNING, "", ex);
                        throw new STSException(
                            "Error while cancelling a token", ex, STSException.REQUEST_FAILED
                        );
                    }
                    break;
                }
            }
            if (tokenResponse == null || tokenResponse.getToken() == null) {
                LOG.fine("No Token Canceller has been found that can handle this token");
                throw new STSException(
                    "No token canceller found for requested token type: "
                    + tokenRequirements.getTokenType(),
                    STSException.REQUEST_FAILED
                );
            }
           
            if (tokenResponse.getToken().getState() != STATE.CANCELLED) {
                LOG.log(Level.WARNING, "Token cancellation failed.");
                throw new STSException("Token cancellation failed.");
            }
           
            // prepare response
View Full Code Here

        cancellerParameters.setToken(cancelTarget);
       
        //
        // Cancel token
        //
        TokenCancellerResponse tokenResponse = null;
        for (TokenCanceller tokenCanceller : tokencancellers) {
            if (tokenCanceller.canHandleToken(cancelTarget)) {
                try {
                    tokenResponse = tokenCanceller.cancelToken(cancellerParameters);
                } catch (RuntimeException ex) {
                    LOG.log(Level.WARNING, "", ex);
                    throw new STSException(
                        "Error while cancelling a token", ex, STSException.REQUEST_FAILED
                    );
                }
                break;
            }
        }
        if (tokenResponse == null || tokenResponse.getToken() == null) {
            LOG.fine("No Token Canceller has been found that can handle this token");
            throw new STSException(
                "No token canceller found for requested token type: "
                + tokenRequirements.getTokenType(),
                STSException.REQUEST_FAILED
            );
        }
       
        if (tokenResponse.getToken().getState() != STATE.CANCELLED) {
            LOG.log(Level.WARNING, "Token cancellation failed.");
            throw new STSException("Token cancellation failed.");
        }
       
        // prepare response
View Full Code Here

TOP

Related Classes of org.apache.cxf.sts.token.canceller.TokenCancellerResponse

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.