Package org.eurekastreams.server.service.security.userdetails

Examples of org.eurekastreams.server.service.security.userdetails.ExtendedUserDetails


     *             not expected.
     */
    @Test
    public final void textPerformAction() throws Exception
    {
        final ExtendedUserDetails userMock = context.mock(ExtendedUserDetails.class);

        final String expectedUserName = "user";

        final Person expectedPerson = context.mock(Person.class);

View Full Code Here


                .mock(HttpServletRequest.class);
        final HttpServletResponse response = context
                .mock(HttpServletResponse.class);
        final String[] cookieTokens = new String[] { "blah",
                String.valueOf(System.currentTimeMillis() + cookieDelay), "whatever" };
        final ExtendedUserDetails userDetails = context
                .mock(ExtendedUserDetails.class);

        context.checking(new Expectations()
        {
            {
View Full Code Here

        final HttpServletRequest request = context
                .mock(HttpServletRequest.class);
        final HttpServletResponse response = context
                .mock(HttpServletResponse.class);
        final String[] cookieTokens = new String[] { "blah", "", "whatever" };
        final ExtendedUserDetails userDetails = context
                .mock(ExtendedUserDetails.class);
        final PersistentLogin login = context.mock(PersistentLogin.class);

        final long cookieTime = System.currentTimeMillis() + cookieDelay;
        cookieTokens[1] = String.valueOf(cookieTime);
View Full Code Here

        final HttpServletRequest request = context
                .mock(HttpServletRequest.class);
        final HttpServletResponse response = context
                .mock(HttpServletResponse.class);
        final String[] cookieTokens = new String[] { "blah", "", "whatever" };
        final ExtendedUserDetails userDetails = context
                .mock(ExtendedUserDetails.class);
        final PersistentLogin login = context.mock(PersistentLogin.class);

        final long cookieTime = System.currentTimeMillis() + cookieDelay;
        cookieTokens[1] = String.valueOf(cookieTime);
View Full Code Here

            Object obj = auth.getPrincipal();
            if (obj instanceof UserDetails)
            {
                UserDetails user = (UserDetails) obj;
                ExtendedUserDetails extUser = (ExtendedUserDetails) user;
                return new DefaultPrincipal(extUser.getUsername(), extUser.getPerson().getOpenSocialId(), extUser
                        .getPerson().getId());
            }
            else
            {
                return null;
View Full Code Here

        // passing userDetails and cookieTokens
        // so this class doesn't have to know about ExtendedUserDetails
        // interface. Only needed if some other UserDetails service is created.
       
        // if not expired load user details
        ExtendedUserDetails userDetails = (ExtendedUserDetails)
                (getUserDetailsService().loadUserByUsername(cookieTokens[0]));

        //if no persistentLogin info returned from UserDetailsService, abort
        //as cookie was misleading or manually invalidated.
       
        PersistentLogin login = userDetails.getPersistentLogin();
       
        if (login == null)
        {
            throw new InvalidCookieException(
                    "No PersistentLogin record in repository");
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.service.security.userdetails.ExtendedUserDetails

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.