Search in sources :

Example 21 with UserRepresentation

use of org.keycloak.representations.account.UserRepresentation in project keycloak by keycloak.

the class AccountRestServiceTest method testGetProfile.

@Test
public void testGetProfile() throws IOException {
    UserRepresentation user = getUser();
    assertEquals("Tom", user.getFirstName());
    assertEquals("Brady", user.getLastName());
    assertEquals("test-user@localhost", user.getEmail());
    assertFalse(user.isEmailVerified());
    assertTrue(user.getAttributes().isEmpty());
}
Also used : UserRepresentation(org.keycloak.representations.account.UserRepresentation) Test(org.junit.Test) AbstractAuthenticationTest(org.keycloak.testsuite.admin.authentication.AbstractAuthenticationTest)

Aggregations

UserRepresentation (org.keycloak.representations.account.UserRepresentation)21 Test (org.junit.Test)18 AbstractAuthenticationTest (org.keycloak.testsuite.admin.authentication.AbstractAuthenticationTest)11 RealmRepresentation (org.keycloak.representations.idm.RealmRepresentation)9 SimpleHttp (org.keycloak.broker.provider.util.SimpleHttp)6 HashMap (java.util.HashMap)5 List (java.util.List)5 UserProfileAttributeMetadata (org.keycloak.representations.account.UserProfileAttributeMetadata)3 VerifyProfileTest (org.keycloak.testsuite.forms.VerifyProfileTest)3 UserResource (org.keycloak.admin.client.resource.UserResource)2 RealmModel (org.keycloak.models.RealmModel)2 ArrayList (java.util.ArrayList)1 BadRequestException (javax.ws.rs.BadRequestException)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1 Produces (javax.ws.rs.Produces)1 NoCache (org.jboss.resteasy.annotations.cache.NoCache)1 UserModel (org.keycloak.models.UserModel)1 TokenUtil (org.keycloak.testsuite.util.TokenUtil)1 UserProfile (org.keycloak.userprofile.UserProfile)1