/
Profile Service (java)
NOTE: Trivore ID Documentation has moved to https://trivoreid.com
The content on this site IS OUT OF DATE!
This space has been archived!
Please go ahead to the new site!
Profile Service (java)
Wrapper for the '/user/{userId}/profile' API. Cannot be used with the Management API. (OIDC Client only)
List of all options:
Get profile fields
Update profile fields
Initialize service
TrivoreID sdk = TrivoreID.openIdClient();
ProfileServiceImpl profileService = new ProfileServiceImpl(sdk.profileService());
Profile management
// get profile of the authenticated user
Profile profile = profileService.get(userId);
// update profile
Mobile mobile = new Mobile("+3584012345678");
mobile.setTags(Arrays.asList("tag1", "tag2"));
Email email1 = new Email("example@example.com");
email1.setTags(Arrays.asList("tag3", "tag4"));
Email email2 = new Email("example2@example.com");
email2.getTags().add("tag5");
Address address = new Address();
address.setCountry("Country");
address.setLocality("FI");
address.setPostalCode("12345");
address.setRegion("Region");
address.setStreetAddress("Street Address");
Name name = new Name();
name.setFamilyName("Smith");
name.setMiddleName("Jr.");
name.setGivenName("John");
Consents consents = new Consents();
consents.setLocationing(true);
consents.setMarketingEmail(true);
profile.setEmails(new LinkedHashSet<>(Arrays.asList(email1, email2)));
profile.getMobiles().add(mobile);
profile.getAddresses().add(address);
profile.setName(name);
profile.setConsents(consents);
profile.setNickName("nickName");
profile.setDateOfBirth("1900-12-29");
// update new fields
profileService.update(userId, profile);
Profile Service Models
, multiple selections available,
Related content
Profile Service (python)
Profile Service (python)
More like this
User Service (java)
User Service (java)
More like this
MyData Service (java)
MyData Service (java)
More like this
Client SDK for Java
Client SDK for Java
More like this
User Service (python)
User Service (python)
More like this