Package org.jasig.cas.client.validation

Examples of org.jasig.cas.client.validation.AssertionImpl


    private Object[] getTestSubjects() {
        final SimplePrincipal simplePrincipal = new SimplePrincipal("simple");
        final SimpleGroup simpleGroup = new SimpleGroup("group");
        final AttributePrincipalImpl attributePrincipal = new AttributePrincipalImpl("attr",
                Collections.<String, Object> singletonMap("LOA", "3"));
        final AssertionPrincipal assertionPrincipal = new AssertionPrincipal("assertion", new AssertionImpl(
                attributePrincipal, Collections.<String, Object> singletonMap("authenticationMethod", "username")));

        return new Object[] { simplePrincipal, simpleGroup, attributePrincipal, assertionPrincipal, };
    }
View Full Code Here


  public void test_cas_auth_authFailure() throws ApsSystemException {
    RequestContext reqCtx = this.getRequestContext();
    MockHttpServletRequest request = (MockHttpServletRequest) reqCtx.getRequest();

    AttributePrincipal attributePrincipal = new AttributePrincipalImpl("admin");
    Assertion assertion = new AssertionImpl(attributePrincipal, new HashMap());
    request.setAttribute(CasClientPluginSystemCostants.JPCASCLIENT_CONST_CAS_ASSERTION, assertion);

    int status = _authenticator.service(reqCtx, ControllerManager.CONTINUE);
    assertEquals(status, ControllerManager.CONTINUE);
    UserDetails currentUser = (UserDetails) request.getSession().getAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER);
View Full Code Here

    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "validateTicket");
      throw new ApsSystemException("Errore in CasClientTicketValidationUtil - validateTicket", t);
    }
    if (null != responseAssertion && null != responseUser && responseAssertion.equalsIgnoreCase(_positiveResponse) && responseUser.length() > 0 ) {
      assertion = new AssertionImpl(responseUser);
    }
    return assertion;
  }
View Full Code Here

TOP

Related Classes of org.jasig.cas.client.validation.AssertionImpl

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.