FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

JCL-337: Truncate expiration dates to second precision by acoburn · Pull Request #444 · inrupt/solid-client-java · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or 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
Expand Up @@ -39,6 +39,7 @@
import java.net.URI;
import java.time.Duration;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -535,7 +536,7 @@ static Map<String, Object> buildAccessGrantv1(final URI agent, final Set<URI> re

final Map<String, Object> credential = new HashMap<>();
credential.put(CONTEXT, Arrays.asList(VC_CONTEXT_URI, INRUPT_CONTEXT_URI));
credential.put("expirationDate", expiration.toString());
credential.put("expirationDate", expiration.truncatedTo(ChronoUnit.SECONDS).toString());
credential.put(CREDENTIAL_SUBJECT, subject);

final Map<String, Object> data = new HashMap<>();
Expand All @@ -559,7 +560,7 @@ static Map<String, Object> buildAccessRequestv1(final URI agent, final Set<URI>

final Map<String, Object> credential = new HashMap<>();
credential.put(CONTEXT, Arrays.asList(VC_CONTEXT_URI, INRUPT_CONTEXT_URI));
credential.put("expirationDate", expiration.toString());
credential.put("expirationDate", expiration.truncatedTo(ChronoUnit.SECONDS).toString());
credential.put(CREDENTIAL_SUBJECT, subject);

final Map<String, Object> data = new HashMap<>();
Expand Down
This file contains hidden or 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
Expand Up @@ -155,7 +155,7 @@ private void setupMocks() {
.atPriority(1)
.withHeader("Authorization", containing("Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9."))
.withRequestBody(containing("\"providedConsent\""))
.withRequestBody(containing("\"2022-08-27"))
.withRequestBody(containing("\"2022-08-27T12:00:00Z\""))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "application/json")
Expand All @@ -165,7 +165,7 @@ private void setupMocks() {
.atPriority(1)
.withHeader("Authorization", containing("Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9."))
.withRequestBody(containing("\"hasConsent\""))
.withRequestBody(containing("\"2022-08-27"))
.withRequestBody(containing("\"2022-08-27T12:00:00Z\""))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "application/json")
Expand Down

Back | FazBrowse Home | New Git URL