-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PB-70375. Add support for IDV authentication
- Loading branch information
Showing
22 changed files
with
1,183 additions
and
85 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,76 +1,100 @@ | ||
package com.silanis.esl.api.model; | ||
// | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.silanis.esl.api.util.SchemaSanitizer; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
@JsonIgnoreProperties(ignoreUnknown=true) | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class Auth extends Model | ||
implements java.io.Serializable | ||
{ | ||
|
||
implements java.io.Serializable { | ||
|
||
// Dirty Flag Constants | ||
@JsonIgnore | ||
public static final String FIELD_CHALLENGES = "challenges"; | ||
@JsonIgnore | ||
public static final String FIELD_SCHEME = "scheme"; | ||
|
||
@JsonIgnore | ||
public static final String FIELD_IDV_WORKFLOW = "idvWorkflow"; | ||
|
||
// Empty Constructor | ||
public Auth ( ) {} | ||
|
||
public Auth() { | ||
} | ||
|
||
// Fields | ||
protected List<AuthChallenge> _challenges = new ArrayList<AuthChallenge>(); | ||
protected IdvWorkflow _idvWorkflow; | ||
protected String _scheme = "NONE"; | ||
|
||
// Accessors | ||
|
||
|
||
public Auth setChallenges( List<AuthChallenge> value ){ | ||
SchemaSanitizer.throwOnNull(FIELD_CHALLENGES,value); | ||
|
||
public IdvWorkflow getIdvWorkflow() { | ||
return _idvWorkflow; | ||
} | ||
|
||
public Auth setIdvWorkflow(IdvWorkflow value) { | ||
this._idvWorkflow = value; | ||
setDirty(FIELD_IDV_WORKFLOW); | ||
return this; | ||
} | ||
|
||
public Auth setChallenges(List<AuthChallenge> value) { | ||
SchemaSanitizer.throwOnNull(FIELD_CHALLENGES, value); | ||
// TODO With proper compare | ||
// if ( this._challenges == value ) return this; | ||
this._challenges = value; | ||
setDirty(FIELD_CHALLENGES); | ||
return this; | ||
} | ||
|
||
// Used internally by aws. Invokes a the corresponding setter if the value is not null | ||
@JsonIgnore | ||
public Auth safeSetChallenges( List<AuthChallenge> value ){ | ||
if ( value != null ) { this.setChallenges( value ); } | ||
public Auth safeSetChallenges(List<AuthChallenge> value) { | ||
if (value != null) { | ||
this.setChallenges(value); | ||
} | ||
return this; | ||
} | ||
public List<AuthChallenge> getChallenges(){ | ||
|
||
public List<AuthChallenge> getChallenges() { | ||
return _challenges; | ||
} | ||
|
||
// List adder | ||
public Auth addChallenge( AuthChallenge value ){ | ||
if (value == null) { throw new IllegalArgumentException("Argument cannot be null"); } | ||
public Auth addChallenge(AuthChallenge value) { | ||
if (value == null) { | ||
throw new IllegalArgumentException("Argument cannot be null"); | ||
} | ||
this._challenges.add(value); | ||
setDirty(FIELD_CHALLENGES); | ||
return this; | ||
} | ||
|
||
|
||
|
||
public Auth setScheme( String value ){ | ||
SchemaSanitizer.throwOnNull(FIELD_SCHEME,value); | ||
|
||
|
||
public Auth setScheme(String value) { | ||
SchemaSanitizer.throwOnNull(FIELD_SCHEME, value); | ||
// TODO With proper compare | ||
// if ( this._scheme == value ) return this; | ||
this._scheme = value; | ||
setDirty(FIELD_SCHEME); | ||
return this; | ||
} | ||
|
||
// Used internally by aws. Invokes a the corresponding setter if the value is not null | ||
@JsonIgnore | ||
public Auth safeSetScheme( String value ){ | ||
if ( value != null ) { this.setScheme( value ); } | ||
public Auth safeSetScheme(String value) { | ||
if (value != null) { | ||
this.setScheme(value); | ||
} | ||
return this; | ||
} | ||
public String getScheme(){ | ||
|
||
public String getScheme() { | ||
return _scheme; | ||
} | ||
|
||
|
||
} |
82 changes: 82 additions & 0 deletions
82
sdk/src/main/java/com/silanis/esl/api/model/IdvWorkflow.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,82 @@ | ||
package com.silanis.esl.api.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
||
import static com.silanis.esl.api.util.SchemaSanitizer.throwOnNull; | ||
|
||
/** | ||
* Created by schoi on 2021-03-10. | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class IdvWorkflow extends Model implements java.io.Serializable { | ||
|
||
@JsonIgnore | ||
public static final String FIELD_ID = "id"; | ||
@JsonIgnore | ||
public static final String FIELD_TYPE = "type"; | ||
@JsonIgnore | ||
public static final String FIELD_TENANT = "tenant"; | ||
@JsonIgnore | ||
public static final String FIELD_DESC = "desc"; | ||
|
||
// Empty Constructor | ||
public IdvWorkflow() { | ||
} | ||
|
||
// Fields | ||
protected String id; | ||
protected String type; | ||
protected String tenant; | ||
protected String desc; | ||
|
||
|
||
public IdvWorkflow setId(String value) { | ||
throwOnNull(FIELD_ID, value); | ||
|
||
this.id = value; | ||
setDirty(FIELD_ID); | ||
return this; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
|
||
public IdvWorkflow setType(String value) { | ||
throwOnNull(FIELD_TYPE, value); | ||
|
||
this.type = value; | ||
setDirty(FIELD_TYPE); | ||
return this; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
|
||
public IdvWorkflow setTenant(String value) { | ||
throwOnNull(FIELD_TENANT, value); | ||
|
||
this.tenant = value; | ||
setDirty(FIELD_TENANT); | ||
return this; | ||
} | ||
|
||
public String getTenant() { | ||
return tenant; | ||
} | ||
|
||
|
||
public IdvWorkflow setDesc(String value) { | ||
this.desc = value; | ||
setDirty(FIELD_DESC); | ||
return this; | ||
} | ||
|
||
public String getDesc() { | ||
return desc; | ||
} | ||
} |
97 changes: 97 additions & 0 deletions
97
sdk/src/main/java/com/silanis/esl/api/model/IdvWorkflowConfiguration.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,97 @@ | ||
package com.silanis.esl.api.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import static com.silanis.esl.api.util.SchemaSanitizer.throwOnNull; | ||
|
||
/** | ||
* Created by schoi on 2021-05-06. | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class IdvWorkflowConfiguration extends Model implements java.io.Serializable { | ||
|
||
@JsonIgnore | ||
public static final String FIELD_ID = "id"; | ||
@JsonIgnore | ||
public static final String FIELD_TYPE = "type"; | ||
@JsonIgnore | ||
public static final String FIELD_TENANT = "tenant"; | ||
@JsonIgnore | ||
public static final String FIELD_DESC = "desc"; | ||
@JsonIgnore | ||
public static final String FIELD_SKIP_WHEN_ACCESSING_SIGNED_DOCUMENTS = "skipWhenAccessingSignedDocuments"; | ||
|
||
@JsonProperty("id") | ||
protected String workflowId; | ||
@JsonProperty("type") | ||
protected String type; | ||
@JsonProperty("tenant") | ||
protected String tenant; | ||
@JsonProperty("desc") | ||
protected String desc; | ||
@JsonProperty("skipWhenAccessingSignedDocuments") | ||
protected boolean skipWhenAccessingSignedDocuments; | ||
|
||
public IdvWorkflowConfiguration setWorkflowId(String value) { | ||
throwOnNull(FIELD_ID, value); | ||
|
||
this.workflowId = value; | ||
setDirty(FIELD_ID); | ||
return this; | ||
} | ||
|
||
public String getWorkflowId() { | ||
return workflowId; | ||
} | ||
|
||
|
||
public IdvWorkflowConfiguration setType(String value) { | ||
throwOnNull(FIELD_TYPE, value); | ||
|
||
this.type = value; | ||
setDirty(FIELD_TYPE); | ||
return this; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
|
||
public IdvWorkflowConfiguration setTenant(String value) { | ||
throwOnNull(FIELD_TENANT, value); | ||
|
||
this.tenant = value; | ||
setDirty(FIELD_TENANT); | ||
return this; | ||
} | ||
|
||
public String getTenant() { | ||
return tenant; | ||
} | ||
|
||
|
||
public IdvWorkflowConfiguration setDesc(String value) { | ||
this.desc = value; | ||
setDirty(FIELD_DESC); | ||
return this; | ||
} | ||
|
||
public String getDesc() { | ||
return desc; | ||
} | ||
|
||
|
||
public IdvWorkflowConfiguration setSkipWhenAccessingSignedDocuments(boolean value) { | ||
this.skipWhenAccessingSignedDocuments = value; | ||
setDirty(FIELD_SKIP_WHEN_ACCESSING_SIGNED_DOCUMENTS); | ||
return this; | ||
} | ||
|
||
public boolean isSkipWhenAccessingSignedDocuments() { | ||
return skipWhenAccessingSignedDocuments; | ||
} | ||
|
||
} |
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
Oops, something went wrong.