Package org.picketlink.identity.federation.core.wstrust

Examples of org.picketlink.identity.federation.core.wstrust.STSClient.validateToken()


                throw logger.authSTSConfigFileNotFound();

            // send the assertion to the STS for validation.
            STSClient client = this.getSTSClient();
            try {
                boolean isValid = client.validateToken(assertionElement);
                // if the STS says the assertion is invalid, throw an exception to signal that authentication has failed.
                if (isValid == false)
                    throw logger.authInvalidSAMLAssertionBySTS();
            } catch (WSTrustException we) {
                throw logger.authAssertionValidationError(we);
View Full Code Here


            setUsernameFromMessageContext(messageContext, configBuilder);
            setPasswordFromMessageContext(messageContext, configBuilder);
            final STSClient stsClient = createSTSClient(configBuilder);

            if (stsClient.validateToken(securityToken) == false) {
                throwFailedAuthentication();
            }
        } catch (final WSTrustException e) {
            throwInvalidSecurity();
        } catch (ParsingException e) {
View Full Code Here

     * @throws WSTrustException if a WS-Trust exception is thrown by the STS.
     */
    private boolean validateInternal(Element token, int clientIndex) throws WSTrustException {
        STSClient client = this.clients[clientIndex];
        try {
            return client.validateToken(token);
        } catch (RuntimeException e) {
            // if this was a connection refused exception and we still have clients to try, call the next client.
            if (this.isCausedByConnectException(e) && clientIndex < this.clients.length - 1) {
                return this.validateInternal(token, ++clientIndex);
            }
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.