Examples of validateToken()


Examples of org.apache.cxf.sts.token.validator.TokenValidator.validateToken()

        validatorParameters.setToken(validateTarget);
       
        assertTrue(samlTokenValidator.canHandleToken(validateTarget));
       
        TokenValidatorResponse validatorResponse =
                samlTokenValidator.validateToken(validatorParameters);
        assertTrue(validatorResponse != null);
        assertTrue(validatorResponse.getToken() != null);
        assertTrue(validatorResponse.getToken().getState() == STATE.EXPIRED);
       
        // Renew the Assertion
View Full Code Here

Examples of org.exoplatform.web.security.security.AbstractTokenService.validateToken()

         //
         String token = getRememberMeTokenCookie(req);
         if (token != null)
         {
            AbstractTokenService tokenService = AbstractTokenService.getInstance(CookieTokenService.class);
            credentials = tokenService.validateToken(token, false);
            if (credentials == null)
            {
               log.debug("Login initiated with no credentials in session but found token an invalid " + token + " " +
                  "that will be cleared in next response");
View Full Code Here

Examples of org.exoplatform.web.security.security.CookieTokenService.validateToken()

        if (req.getRemoteUser() == null) {
            String token = LoginServlet.getRememberMeTokenCookie(req);
            if (token != null) {
                ExoContainer container = getContainer();
                CookieTokenService tokenservice = container.getComponentInstanceOfType(CookieTokenService.class);
                Credentials credentials = tokenservice.validateToken(token, false);
                if (credentials != null) {
                    ServletContainer servletContainer = ServletContainerFactory.getServletContainer();
                    try {
                        servletContainer.login(req, resp, credentials);
                    } catch (Exception e) {
View Full Code Here

Examples of org.jboss.ws.extensions.security.BinarySecurityTokenValidator.validateToken()

         String tag = child.getLocalName();

         if (tag.equals("BinarySecurityToken"))
         {
            BinarySecurityToken token = BinarySecurityToken.createBinarySecurityToken(child);
            validator.validateToken(token);
            resolver.cacheToken(token);
            tokens.add(token);
         }
         else if (tag.equals("UsernameToken"))
            tokens.add(new UsernameToken(child));
View Full Code Here

Examples of org.picketlink.identity.federation.core.interfaces.SecurityTokenProvider.validateToken()

        if (provider == null)
            throw logger.stsNoTokenProviderError(configuration.toString(), protocolContext.toString());

        logger.debug("validateToken::provider=" + provider);

        provider.validateToken(protocolContext);
    }

    private SecurityTokenProvider getProvider(ProtocolContext protocolContext) {
        if (configuration == null)
            throw new RuntimeException(ErrorCodes.STS_CONFIGURATION_NOT_SET);
View Full Code Here

Examples of org.picketlink.identity.federation.core.sts.PicketLinkCoreSTS.validateToken()

            try {
                if (securityToken != null)
                    context.setQName(new QName(securityToken.getNamespaceURI(), securityToken.getLocalName()));
                PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
                sts.initialize(configuration);
                sts.validateToken(context);
                // provider.validateToken(context);
            } catch (ProcessingException e) {
                throw logger.stsError(e);
            }
            status = context.getStatus();
View Full Code Here

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
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.