Skip to content
Snippets Groups Projects
Commit ac56ee33 authored by Klaus Fischer's avatar Klaus Fischer
Browse files

WIP: 3.11 Schema for data

parent 8dda3a3c
No related branches found
No related tags found
1 merge request!24AutoReject planning#594
...@@ -151,8 +151,9 @@ public class Subscriber : FitConnectClient, ...@@ -151,8 +151,9 @@ public class Subscriber : FitConnectClient,
throw new ArgumentException("Destination not found"); throw new ArgumentException("Destination not found");
} }
if (!destination.Services!.Select(s => s.Identifier) var destinationService = destination.Services!.FirstOrDefault(s =>
.Contains(submission.Metadata.PublicServiceType.Identifier)) { s.Identifier == submission.Metadata.PublicServiceType.Identifier);
if (destinationService == null) {
var problem = new Problems(Problems.ProblemTypeEnum.UnsupportedService, var problem = new Problems(Problems.ProblemTypeEnum.UnsupportedService,
Problems.DetailUnsupportedService); Problems.DetailUnsupportedService);
RejectSubmission(problem); RejectSubmission(problem);
...@@ -174,6 +175,17 @@ public class Subscriber : FitConnectClient, ...@@ -174,6 +175,17 @@ public class Subscriber : FitConnectClient,
throw new SecurityEventException(problem); throw new SecurityEventException(problem);
} }
// SuccessCriteria:3.11
// TODO get data schema for data
string? dataSchema = null;
if (dataSchema != null) {
if (destinationService.SubmissionSchemas.Select(s => s.SchemaUri)
.Contains(dataSchema)) {
}
}
Dictionary<string, string> attachmentSignatures = Dictionary<string, string> attachmentSignatures =
(submitEvent.Payload as dynamic)?.authenticationTags?.attachments (submitEvent.Payload as dynamic)?.authenticationTags?.attachments
.ToObject<Dictionary<string, string>>()!; .ToObject<Dictionary<string, string>>()!;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment