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
/wiki/spaces/TISpubdoc/pages/20515246
/wiki/spaces/TISpubdoc/pages/20515253
/wiki/spaces/TISpubdoc/pages/20515254
/wiki/spaces/TISpubdoc/pages/20515250