-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STNG-133 Support for multiple third party auth headers
- Loading branch information
Showing
11 changed files
with
173 additions
and
28 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
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
25 changes: 25 additions & 0 deletions
25
core/src/main/java/org/dcsa/conformance/core/party/HttpHeaderConfiguration.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,25 @@ | ||
package org.dcsa.conformance.core.party; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import lombok.*; | ||
|
||
import static org.dcsa.conformance.core.toolkit.JsonToolkit.OBJECT_MAPPER; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
@ToString | ||
public class HttpHeaderConfiguration { | ||
private String headerName; | ||
private String headerValue; | ||
|
||
public JsonNode toJsonNode() { | ||
return OBJECT_MAPPER.valueToTree(this); | ||
} | ||
|
||
@SneakyThrows | ||
public static HttpHeaderConfiguration fromJsonNode(JsonNode jsonNode) { | ||
return OBJECT_MAPPER.treeToValue(jsonNode, HttpHeaderConfiguration.class); | ||
} | ||
} |
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
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
28 changes: 28 additions & 0 deletions
28
webui/src/app/pages/edit-header/edit-header.component.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,28 @@ | ||
<div> | ||
<br /> | ||
<mat-form-field class="fullWidth"> | ||
<mat-label>Header name</mat-label> | ||
<input | ||
matInput | ||
#headerNameInput | ||
type = "text" | ||
autocomplete="off" | ||
name="headerNameTextField" | ||
[(ngModel)]="headerNameAndValue.headerName" | ||
/> | ||
</mat-form-field> | ||
</div> | ||
|
||
<div> | ||
<mat-form-field class="fullWidth"> | ||
<mat-label>Header value</mat-label> | ||
<input | ||
matInput | ||
#headerValueInput | ||
type = "text" | ||
autocomplete="off" | ||
name="headerValueTextField" | ||
[(ngModel)]="headerNameAndValue.headerValue" | ||
/> | ||
</mat-form-field> | ||
</div> |
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,11 @@ | ||
import {Component, Input} from "@angular/core"; | ||
import {HeaderNameAndValue} from "src/app/model/sandbox-config"; | ||
|
||
@Component({ | ||
selector: 'app-edit-header', | ||
templateUrl: './edit-header.component.html', | ||
styleUrls: ['../../shared-styles.css'] | ||
}) | ||
export class EditHeaderComponent { | ||
@Input() headerNameAndValue!: HeaderNameAndValue; | ||
} |
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
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