-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDK-2372: Add support for requesting, and fetching advanced identity …
…profiles
- Loading branch information
Showing
15 changed files
with
622 additions
and
2 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
examples/doc-scan/src/main/resources/templates/fragments/advanced_identity_profile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> | ||
|
||
<!--@thymesVar id="advancedIdentityProfile" type="com.yoti.api.client.docs.session.retrieve.identityprofile.advanced.AdvancedIdentityProfileReportResponse"--> | ||
<th:block th:fragment="advanced-identity-profile-report-template(${advancedIdentityProfile})"> | ||
<div class="row pt-4"> | ||
<div class="col"> | ||
<h2>Advanced Identity Profile</h2> | ||
</div> | ||
</div> | ||
|
||
<div class="card" th:if="${advancedIdentityProfile.getMedia() != null}"> | ||
Generated Profile Media: <a th:href="${'/media?mediaId=' + advancedIdentityProfile.getMedia().getId()}" | ||
th:text="${advancedIdentityProfile.getMedia().getId()}"> | ||
</a> | ||
</div> | ||
|
||
<div class="accordion" id="advanced-identity-profile-accordion"> | ||
<div class="accordion-item" th:each="compliance, idx : ${advancedIdentityProfile.getCompliance()}" th:with> | ||
<h2 class="accordion-header" th:attr="id='compliance-header'+${idx}"> | ||
<button class="accordion-button" type="button" th:text="${compliance.getTrustFramework()}" th:attr="data-bs-toggle='compliance'+${idx},data-bs-target='#compliance'+${idx},aria-controls='compliance'+${idx}" aria-expanded="true"/> | ||
</h2> | ||
<div th:attr="id='compliance'+${compliance.getTrustFramework()},aria-labelled-by='compliance'+${idx}" class="accordion-collapse collapse show" data-bs-parent="#advanced-identity-profile-accordion"> | ||
<div class="accordion-body"> | ||
<div th:each="scheme : ${compliance.getSchemesCompliance()}"> | ||
Requirements Not Met: <span th:text="${scheme.getRequirementsMet()}"/> | ||
Requirements Not Met Info: <span th:text="${scheme.getRequirementsNotMetInfo()}"/> | ||
<br> | ||
<th:block th:if="${scheme.getScheme() != null}"> | ||
Type: <span th:text="${scheme.getScheme().getType()}"/> | ||
Objective: <span th:text="${scheme.getScheme().getObjective()}"/> | ||
Label: <span th:text="${scheme.getScheme().getLabel()}"/> | ||
</th:block> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</th:block> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
...i/client/docs/session/create/identityprofile/advanced/AdvancedIdentityProfilePayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package com.yoti.api.client.docs.session.create.identityprofile.advanced; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class AdvancedIdentityProfilePayload { | ||
|
||
@JsonProperty("trust_framework") | ||
private final String trustFramework; | ||
|
||
@JsonProperty("schemes") | ||
private final List<AdvancedIdentityProfileSchemePayload> schemes; | ||
|
||
private AdvancedIdentityProfilePayload(String trustFramework, List<AdvancedIdentityProfileSchemePayload> schemes) { | ||
this.trustFramework = trustFramework; | ||
this.schemes = schemes; | ||
} | ||
|
||
public static AdvancedIdentityProfilePayload.Builder builder() { | ||
return new AdvancedIdentityProfilePayload.Builder(); | ||
} | ||
|
||
/** | ||
* Returns the trust framework of the profile being requested | ||
* | ||
* @return the trust framework | ||
*/ | ||
public String getTrustFramework() { | ||
return trustFramework; | ||
} | ||
|
||
/** | ||
* Returns the schemes being requested under the trust framework | ||
* | ||
* @return the schemes | ||
*/ | ||
public List<AdvancedIdentityProfileSchemePayload> getSchemes() { | ||
return schemes; | ||
} | ||
|
||
public static final class Builder { | ||
|
||
private String trustFramework; | ||
private List<AdvancedIdentityProfileSchemePayload> schemes; | ||
|
||
private Builder() {} | ||
|
||
/** | ||
* Sets the trust framework of the requested profile | ||
* | ||
* @param trustFramework the trust framework | ||
* @return the builder | ||
*/ | ||
public Builder withTrustFramework(String trustFramework) { | ||
this.trustFramework = trustFramework; | ||
return this; | ||
} | ||
|
||
/** | ||
* Sets the schemes to be requested under the trust framework | ||
* | ||
* @param schemes the schemes | ||
* @return the builder | ||
*/ | ||
public Builder withSchemes(List<AdvancedIdentityProfileSchemePayload> schemes) { | ||
this.schemes = schemes; | ||
return this; | ||
} | ||
|
||
/** | ||
* Adds a scheme to be requested under the trust framework | ||
* | ||
* @param scheme the scheme | ||
* @return the builder | ||
*/ | ||
public Builder withScheme(AdvancedIdentityProfileSchemePayload scheme) { | ||
if (this.schemes == null) { | ||
this.schemes = new ArrayList<>(); | ||
} | ||
this.schemes.add(scheme); | ||
return this; | ||
} | ||
|
||
public AdvancedIdentityProfilePayload build() { | ||
return new AdvancedIdentityProfilePayload(trustFramework, schemes); | ||
} | ||
|
||
} | ||
|
||
} |
55 changes: 55 additions & 0 deletions
55
...s/session/create/identityprofile/advanced/AdvancedIdentityProfileRequirementsPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.yoti.api.client.docs.session.create.identityprofile.advanced; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class AdvancedIdentityProfileRequirementsPayload { | ||
|
||
@JsonProperty("profiles") | ||
private final List<AdvancedIdentityProfilePayload> profiles; | ||
|
||
private AdvancedIdentityProfileRequirementsPayload(List<AdvancedIdentityProfilePayload> profiles) { | ||
this.profiles = profiles; | ||
} | ||
|
||
public static AdvancedIdentityProfileRequirementsPayload.Builder builder() { | ||
return new AdvancedIdentityProfileRequirementsPayload.Builder(); | ||
} | ||
|
||
/** | ||
* Returns the list of profiles that have been requested as part of the Advanced Identity Profile | ||
* | ||
* @return the list of profiles | ||
*/ | ||
public List<AdvancedIdentityProfilePayload> getProfiles() { | ||
return profiles; | ||
} | ||
|
||
public static final class Builder { | ||
|
||
private List<AdvancedIdentityProfilePayload> profiles; | ||
|
||
private Builder() {} | ||
|
||
public Builder withProfiles(List<AdvancedIdentityProfilePayload> profiles) { | ||
this.profiles = profiles; | ||
return this; | ||
} | ||
|
||
public Builder withProfile(AdvancedIdentityProfilePayload profile) { | ||
if (this.profiles == null) { | ||
this.profiles = new ArrayList<>(); | ||
} | ||
this.profiles.add(profile); | ||
return this; | ||
} | ||
|
||
public AdvancedIdentityProfileRequirementsPayload build() { | ||
return new AdvancedIdentityProfileRequirementsPayload(profiles); | ||
} | ||
|
||
} | ||
|
||
} |
53 changes: 53 additions & 0 deletions
53
...s/session/create/identityprofile/advanced/AdvancedIdentityProfileSchemeConfigPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.yoti.api.client.docs.session.create.identityprofile.advanced; | ||
|
||
import com.yoti.api.client.docs.session.create.filters.DocumentFilter; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class AdvancedIdentityProfileSchemeConfigPayload { | ||
|
||
@JsonProperty("filter") | ||
private final DocumentFilter filter; | ||
|
||
private AdvancedIdentityProfileSchemeConfigPayload(DocumentFilter filter) { | ||
this.filter = filter; | ||
} | ||
|
||
public static AdvancedIdentityProfileSchemeConfigPayload.Builder builder() { | ||
return new AdvancedIdentityProfileSchemeConfigPayload.Builder(); | ||
} | ||
|
||
/** | ||
* Gets the filter for the configuration | ||
* | ||
* @return the filter | ||
*/ | ||
public DocumentFilter getFilter() { | ||
return filter; | ||
} | ||
|
||
public static final class Builder { | ||
|
||
private DocumentFilter filter; | ||
|
||
private Builder() {} | ||
|
||
/** | ||
* Sets the filter for the scheme configuration | ||
* | ||
* @param filter the document filter | ||
* @return the builder | ||
*/ | ||
public Builder withFilter(DocumentFilter filter) { | ||
this.filter = filter; | ||
return this; | ||
} | ||
|
||
public AdvancedIdentityProfileSchemeConfigPayload build() { | ||
return new AdvancedIdentityProfileSchemeConfigPayload(filter); | ||
} | ||
|
||
} | ||
|
||
|
||
} |
Oops, something went wrong.