Examples of ValidateRequest


Examples of com.atlauncher.data.mojang.auth.ValidateRequest

        boolean success = false;
        Gson gson = new Gson();
        StringBuilder response = null;
        try {
            URL url = new URL("https://authserver.mojang.com/validate");
            String request = gson.toJson(new ValidateRequest(accessToken));
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            connection.setConnectTimeout(15000);
            connection.setReadTimeout(15000);
            connection.setRequestMethod("POST");
View Full Code Here

Examples of org.jboss.seam.rest.validation.ValidateRequest

        }

        Set<ConstraintViolation<Object>> violations = new HashSet<ConstraintViolation<Object>>();

        MethodMetadata method = metadata.getMethodMetadata(ctx.getMethod());
        ValidateRequest interceptorBinding = method.getInterceptorBinding();
        Class<?>[] groups = interceptorBinding.groups();

        // validate JAX-RS resource fields
        if (interceptorBinding.validateResourceFields()) {
            log.debugv("Validating JAX-RS resource {0}", ctx.getTarget());
            violations.addAll(validator.validate(ctx.getTarget(), groups));
        }

        // validate message body
        if (interceptorBinding.validateMessageBody() && (method.getMessageBody() != null)) {
            Object parameter = ctx.getParameters()[method.getMessageBody()];
            log.debugv("Validating HTTP message body {0}", parameter);
            violations.addAll(validator.validate(parameter, groups));
        }
View Full Code Here

Examples of org.jboss.seam.rest.validation.ValidateRequest

    }

    private void scanMethod(Method method) {
        Integer messageBodyIndex = null;
        Set<Integer> otherValidatedParameters = new HashSet<Integer>();
        ValidateRequest interceptorBinding = getInterceptorBinding(method);

        log.debugv("This is the first time {0} is invoked. Scanning.", method);

        Annotation[][] parameterAnnotations = method.getParameterAnnotations();
        for (int i = 0; i < parameterAnnotations.length; i++) {
View Full Code Here

Examples of org.jboss.seam.rest.validation.ValidateRequest

        metadata.addMethodMetadata(new MethodMetadata(method, messageBodyIndex, otherValidatedParameters, interceptorBinding));
    }

    private ValidateRequest getInterceptorBinding(Method method) {
        // check for @ValidateRequest on method
        ValidateRequest interceptorBinding = AnnotationInspector.getAnnotation(method, ValidateRequest.class, manager);
        // check for @ValidateRequest on class
        if (interceptorBinding == null) {
            interceptorBinding = AnnotationInspector.getAnnotation(method.getDeclaringClass(), ValidateRequest.class, manager);
        }
        if (interceptorBinding == null) {
View Full Code Here

Examples of org.wso2.xkms2.ValidateRequest

    public static boolean validateCertPath(X509Certificate cert,
                                           String serviceURL) {
        try {

            ValidateRequest request = createValidateRequest();
            request.setServiceURI(serviceURL);

            QueryKeyBinding keyBinding = createQueryKeyBinding();
            keyBinding.setCertValue(cert);

            String name = cert.getSubjectDN().getName();
            keyBinding.addUseKeyWith(UseKeyWith.PKIX, name);

            request.setQueryKeyBinding(keyBinding);
            request.addRespondWith(RespondWith.X_509_CERT);

            OMElement element = getElement(request);
            OMElement result = sendReceive(element, serviceURL);
            result = buildElement(result);
View Full Code Here

Examples of org.wso2.xkms2.ValidateRequest

        recoverRequest.setId(XKMSUtil.getRamdomId());
        return recoverRequest;
    }

    public static ValidateRequest createValidateRequest() {
        ValidateRequest validate = new ValidateRequest();
        validate.setId(XKMSUtil.getRamdomId());
        return validate;
    }
View Full Code Here

Examples of org.wso2.xkms2.ValidateRequest

        recoverRequest.setId(XKMSUtil.getRamdomId());
        return recoverRequest;
    }
   
    public static ValidateRequest createValidateRequest() {
        ValidateRequest validate = new ValidateRequest();
        validate.setId(XKMSUtil.getRamdomId());
        return validate;
    }
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.