Package org.pac4j.http.profile

Examples of org.pac4j.http.profile.HttpProfile


    }
   
    @Override
    protected HttpProfile retrieveUserProfile(final UsernamePasswordCredentials credentials, final WebContext context) {
        // create user profile
        final HttpProfile profile = this.profileCreator.create(credentials.getUsername());
        logger.debug("profile : {}", profile);
        return profile;
    }
View Full Code Here


    }
   
    public void testGetUserProfile() {
        final FormClient formClient = getFormClient();
        final MockWebContext context = MockWebContext.create();
        final HttpProfile profile = formClient.getUserProfile(new UsernamePasswordCredentials(USERNAME, USERNAME,
                                                                                              formClient.getName()),
                                                              context);
        assertEquals(USERNAME, profile.getId());
        assertEquals(HttpProfile.class.getSimpleName() + UserProfile.SEPARATOR + USERNAME, profile.getTypedId());
        assertTrue(ProfileHelper.isTypedIdOf(profile.getTypedId(), HttpProfile.class));
        assertEquals(USERNAME, profile.getUsername());
        assertEquals(1, profile.getAttributes().size());
    }
View Full Code Here

TOP

Related Classes of org.pac4j.http.profile.HttpProfile

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.