Package org.jasig.cas.validation

Examples of org.jasig.cas.validation.Assertion


    private boolean successResponse;

    protected void renderMergedOutputModel(final Map model,
        final HttpServletRequest request, final HttpServletResponse response)
        throws Exception {
        final Assertion assertion = getAssertionFrom(model);

        if (this.successResponse) {
            response.getWriter().print(
                "yes\n"
                    + assertion.getChainedAuthentications().get(0).getPrincipal()
                        .getId() + "\n");
        } else {
            response.getWriter().print("no\n\n");
        }
    }
View Full Code Here


                    logger.error("TicketException generating ticket for: "
                        + serviceCredentials, e);
                }
            }

            final Assertion assertion = this.centralAuthenticationService.validateServiceTicket(serviceTicketId, service);

            final ValidationSpecification validationSpecification = this.getCommandClass();
            final ServletRequestDataBinder binder = new ServletRequestDataBinder(validationSpecification, "validationSpecification");
            initBinder(request, binder);
            binder.bind(request);
View Full Code Here

    @Override
    protected void renderMergedOutputModel(final Map model,
        final HttpServletRequest request, final HttpServletResponse response) throws Exception {

        try {
            final Assertion assertion = getAssertionFrom(model);
            final Authentication authentication = assertion.getChainedAuthentications().get(0);
            final Date currentDate = new Date();
            final String authenticationMethod = (String) authentication.getAttributes().get(SamlAuthenticationMetaDataPopulator.ATTRIBUTE_AUTHENTICATION_METHOD);
            final Service service = assertion.getService();
            final SAMLResponse samlResponse = new SAMLResponse(null, service.getId(), new ArrayList<Object>(), null);

            samlResponse.setIssueInstant(currentDate);

            // this should be true, but we never enforced it, so we need to check to be safe
View Full Code Here

        authentication.getAttributes().put("testSamlAttribute", "value");
       
        final List<Authentication> authentications = new ArrayList<Authentication>();
        authentications.add(authentication);
       
        final Assertion assertion = new ImmutableAssertionImpl(authentications, TestUtils.getService(), true);
       
        model.put("assertion", assertion);
       
        final MockWriterHttpMockHttpServletResponse servletResponse = new MockWriterHttpMockHttpServletResponse();
       
View Full Code Here

        authentication.getAttributes().put("testSamlAttribute", "value");
       
        final List<Authentication> authentications = new ArrayList<Authentication>();
        authentications.add(authentication);
       
        final Assertion assertion = new ImmutableAssertionImpl(authentications, TestUtils.getService(), true);
       
        model.put("assertion", assertion);
       
        final MockWriterHttpMockHttpServletResponse servletResponse = new MockWriterHttpMockHttpServletResponse();
       
View Full Code Here

       
        final MutableAuthentication authentication = new MutableAuthentication(principal);
        final List<Authentication> authentications = new ArrayList<Authentication>();
        authentications.add(authentication);
       
        final Assertion assertion = new ImmutableAssertionImpl(authentications, TestUtils.getService(), true);
       
        model.put("assertion", assertion);
       
        final MockWriterHttpMockHttpServletResponse servletResponse = new MockWriterHttpMockHttpServletResponse();
       
View Full Code Here

       
        final MutableAuthentication authentication = new MutableAuthentication(principal);
        final List<Authentication> authentications = new ArrayList<Authentication>();
        authentications.add(authentication);
       
        final Assertion assertion = new ImmutableAssertionImpl(authentications, TestUtils.getService(), true);
       
        model.put("assertion", assertion);
       
        try {
            this.response.renderMergedOutputModel(model, new MockHttpServletRequest(), new MockHttpServletResponse());
View Full Code Here

TOP

Related Classes of org.jasig.cas.validation.Assertion

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.