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,
throw new ArgumentException("Destination not found");
}
if (!destination.Services!.Select(s => s.Identifier)
.Contains(submission.Metadata.PublicServiceType.Identifier)) {
var destinationService = destination.Services!.FirstOrDefault(s =>
s.Identifier == submission.Metadata.PublicServiceType.Identifier);
if (destinationService == null) {
var problem = new Problems(Problems.ProblemTypeEnum.UnsupportedService,
Problems.DetailUnsupportedService);
RejectSubmission(problem);
......@@ -174,6 +175,17 @@ public class Subscriber : FitConnectClient,
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 =
(submitEvent.Payload as dynamic)?.authenticationTags?.attachments
.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