Examples of VerificationResult


Examples of org.apache.bcel.verifier.VerificationResult

            {
                // System.out.println(s);
            }
        });
        Verifier verifier = VerifierFactory.getVerifier(className);
        VerificationResult result;
        result = verifier.doPass1();
        if (VerificationResult.VERIFIED_OK != result.getStatus())
        {
            JPOXLogger.ENHANCER.fatal(result.getMessage());
            return;
        }

        result = verifier.doPass2();
        if (VerificationResult.VERIFIED_OK != result.getStatus())
        {
            JPOXLogger.ENHANCER.fatal(result.getMessage());
            return;
        }
        Method methods[] = ((BCELClassMetaData) cmd).getClassGen().getMethods();
        JPOXLogger.ENHANCER.info("methods num:" + methods.length);
        for (int i = 0; i < methods.length; i++)
        {
            try
            {
                result = verifier.doPass3a(i);
                if (VerificationResult.VERIFIED_OK != result.getStatus())
                {
                    JPOXLogger.ENHANCER.fatal(result.getMessage());
                    // return;
                }
            }
            catch (Exception e)
            {
View Full Code Here

Examples of org.aspectj.apache.bcel.verifier.VerificationResult

                        .getStart()), f, icv, ev);
            }
        } catch (VerifierConstraintViolatedException ce) {
            ce.extendMessage("Constraint violated in method '"
                    + methods[method_no] + "':\n", "");
            return new VerificationResult(VerificationResult.VERIFIED_REJECTED,
                    ce.getMessage());
        } catch (RuntimeException re) {
            // These are internal errors

            StringWriter sw = new StringWriter();
View Full Code Here

Examples of org.jinstagram.realtime.SubscriptionUtil.VerificationResult

  public void shouldReturnSameResultWithPhytonImplementation() throws InstagramException{
    String clientSecret = "5f395ee5acae448bbbcf01a251c480f6";
    String jsonResponse = "[{\"subscription_id\":\"1\",\"object\":\"user\",\"object_id\":\"1234\",\"changed_aspect\":\"media\",\"time\":1297286541},{\"subscription_id\":\"2\",\"object\":\"tag\",\"object_id\":\"nofilter\",\"changed_aspect\":\"media\",\"time\":1297286541}]";
    String xHubSignature = "53a41d80a55a9265fc72633d432e22e6dc05fd64";
   
    VerificationResult result = SubscriptionUtil.verifySubscriptionPostRequestSignature(clientSecret,
              jsonResponse.getBytes(Charset.forName("UTF-8")), xHubSignature);
    Assert.assertTrue(result.isSuccess());
  }
View Full Code Here

Examples of org.openid4java.consumer.VerificationResult

      if (queryString != null && queryString.length() > 0)
        receivingURL.append("?").append(httpReq.getQueryString());

      // verify the response; ConsumerManager needs to be the same
      // (static) instance used to place the authentication request
      VerificationResult verification = manager.verify(receivingURL
          .toString(), response, discovered);

      // examine the verification result and extract the verified
      // identifier
      Identifier verified = verification.getVerifiedId();
      if (verified != null) {
        AuthSuccess authSuccess = (AuthSuccess) verification
            .getAuthResponse();

        receiveSimpleRegistration(httpReq, authSuccess);

        receiveAttributeExchange(httpReq, authSuccess);
View Full Code Here

Examples of org.openid4java.consumer.VerificationResult

        String queryString = request.getQueryString();
        if (queryString != null && queryString.length() > 0)
            receivingURL.append("?").append(request.getQueryString());

        // verify the response
        VerificationResult verification = _consumerManager.verify(
                receivingURL.toString(), openidResp, discovered);

        verification.getVerifiedId();

        Message authResponse = verification.getAuthResponse();

        if (!(authResponse instanceof AuthSuccess))
        {
            _logger.error("Negative auth response received; showing login view...");

            model.put("message", "Negative authentication response received from the OpenID Provider.");

            return new ModelAndView(_loginView, model);
        }

        Identifier verified = verification.getVerifiedId();
        String identifier;

        if (verified == null)
        {
            _logger.error("OpenID verification failed; showing login view...");

            model.put("message", verification.getStatusMsg());

            return new ModelAndView(_loginView, model);
        }
        else
        {
View Full Code Here

Examples of org.openid4java.consumer.VerificationResult

            }
            ParameterList response = new ParameterList(paramsMap);

            // verify the response; ConsumerManager needs to be the same
            // (static) instance used to place the authentication request
            VerificationResult verification =
                manager.verify(returnToUrl.toString(), response, discovered);

            // examine the verification result and extract the verified
            // identifier
            Identifier verified = verification.getVerifiedId();
            if (verified != null) {
                AuthSuccess authSuccess = (AuthSuccess) verification
                        .getAuthResponse();
                if (!openId.equals(authSuccess.getIdentity()))
                {
                    throw new ServletException("Invalid Openid");
                }
View Full Code Here

Examples of org.openid4java.consumer.VerificationResult

      // Verify the response
      // ConsumerManager needs to be the same (static) instance used
      // to place the authentication request
      // This could be tricky if this service is load-balanced
      VerificationResult verification = manager.verify(
        receivingURL.toString(),
        parameterList,
        discovered);

      // Examine the verification result and extract the verified identifier
      Optional<Identifier> verified = Optional.fromNullable(verification.getVerifiedId());
      if (verified.isPresent()) {
        // Verified
        AuthSuccess authSuccess = (AuthSuccess) verification.getAuthResponse();

        // We have successfully authenticated so remove the temp user
        // and replace it with a potentially new one
        userDao.delete(tempUser);
View Full Code Here

Examples of org.openid4java.consumer.VerificationResult

        AuthRequest authReq = consumerManager.authenticate(discoveryInformation, callbackURL);
        return authReq.getDestinationUrl(true);
    }

    public String getIdentifier(String receivingURL, Map<String, Object> params, DiscoveryInformation discoveryInformation) throws OpenIDException {
        VerificationResult verification = consumerManager.verify(receivingURL, new ParameterList(params), discoveryInformation);

        Identifier verified = verification.getVerifiedId();
        if (verified != null)
            return verified.getIdentifier();

        return null;
    }
View Full Code Here

Examples of org.openid4java.consumer.VerificationResult

            if (queryString != null && queryString.length() > 0)
                receivingURL.append("?").append(queryString);

            // verify the response; ConsumerManager needs to be the same
            // (static) instance used to place the authentication request
            VerificationResult verification = openIdConsumerManager.verify(
                    receivingURL.toString(), parameterList, discovered);

            // examine the verification result and extract the verified identifier
            Identifier identifier = verification.getVerifiedId();

            if (identifier != null) {
                AuthSuccess authSuccess = (AuthSuccess) verification.getAuthResponse();

                Map<String, List<String>> attributeValues = null;
                if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
                    FetchResponse fetchResp = (FetchResponse) authSuccess.getExtension(AxMessage.OPENID_NS_AX);
                    @SuppressWarnings("unchecked")
                    Map<String, List<String>> attrValues = fetchResp.getAttributes();
                    attributeValues = attrValues;
                }

                OpenIdPrincipal principal = createPrincipal(identifier.getIdentifier(),
                        discovered.getOPEndpoint(), attributeValues);

                openIdRelyingPartySpi.get().loginSucceeded(principal,
                        responseHandler.createResponseHolder(httpResponse));
            } else {
                openIdRelyingPartySpi.get().loginFailed(verification.getStatusMsg(),
                        responseHandler.createResponseHolder(httpResponse));
            }
        } catch (OpenIDException e) {
            responseHandler.sendError(HttpServletResponse.SC_BAD_REQUEST, e.getMessage(), httpResponse);
            return;
View Full Code Here

Examples of org.openid4java.consumer.VerificationResult

            if (queryString != null && queryString.length() > 0)
                receivingURL.append("?").append(httpReq.getQueryString());
           
            // verify the response; ConsumerManager needs to be the same
            // (static) instance used to place the authentication request
            VerificationResult verification = manager.verify(
                                                             receivingURL.toString(),
                                                             response, discovered);
           
            // examine the verification result and extract the verified identifier
            Identifier verified = verification.getVerifiedId();
            if (verified != null) {
                AuthSuccess authSuccess =
                    (AuthSuccess) verification.getAuthResponse();
               
                System.out.println("*** EXT: " + authSuccess.getExtensions());
                if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
                    FetchResponse fetchResp = (FetchResponse) authSuccess
                        .getExtension(AxMessage.OPENID_NS_AX);
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.