Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FIT-Connect-SDK - .NET
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FIT-Connect
FIT-Connect-SDK - .NET
Commits
b16cefdf
Commit
b16cefdf
authored
1 year ago
by
Klaus Fischer
Browse files
Options
Downloads
Patches
Plain Diff
fix: resolves all possible warnings
parent
e907b2bc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!94
Epic/1256 bidiko
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
FitConnect/FitConnectClient.cs
+6
-3
6 additions, 3 deletions
FitConnect/FitConnectClient.cs
FitConnect/Subscriber.cs
+3
-0
3 additions, 0 deletions
FitConnect/Subscriber.cs
JwkGenerator/JsonWebKey.cs
+13
-12
13 additions, 12 deletions
JwkGenerator/JsonWebKey.cs
with
22 additions
and
15 deletions
FitConnect/FitConnectClient.cs
+
6
−
3
View file @
b16cefdf
...
...
@@ -229,9 +229,12 @@ public abstract class FitConnectClient : IFitConnectClient {
protected
virtual
async
Task
<
ICollection
<
ValidationError
>>
CheckDataSchemaAsync
(
Submission
submission
)
{
var
jSchema
=
await
JsonSchema
.
FromUrlAsync
(
submission
.
Metadata
?.
ContentStructure
.
Data
.
SubmissionSchema
.
SchemaUri
.
ToString
());
return
jSchema
.
Validate
(
submission
.
Data
);
var
url
=
submission
.
Metadata
?.
ContentStructure
.
Data
.
SubmissionSchema
.
SchemaUri
?.
ToString
();
if
(
url
==
null
)
return
new
List
<
ValidationError
>();
var
jSchema
=
await
JsonSchema
.
FromUrlAsync
(
url
);
return
submission
.
Data
==
null
?
new
List
<
ValidationError
>()
:
jSchema
.
Validate
(
submission
.
Data
);
}
/// <summary>
...
...
This diff is collapsed.
Click to expand it.
FitConnect/Subscriber.cs
+
3
−
0
View file @
b16cefdf
...
...
@@ -271,6 +271,9 @@ public class Subscriber : FitConnectClient, IReceivedSubmission,
var
submissionAuthentication
=
new
AuthenticationTags
(
dataSignature
,
metadataSignature
,
attachmentSignatures
);
if
(
metadata
==
null
||
dataString
==
null
)
throw
new
FitConnectSubscriberException
(
"Metadata or data is null"
);
return
new
ReceivedReply
(
reply
.
ReplyId
,
reply
.
CaseId
,
metadata
,
dataString
,
decryptedAttachments
,
submissionAuthentication
);
}
...
...
This diff is collapsed.
Click to expand it.
JwkGenerator/JsonWebKey.cs
+
13
−
12
View file @
b16cefdf
...
...
@@ -6,21 +6,22 @@ using JsonSerializer = System.Text.Json.JsonSerializer;
namespace
JwkGenerator
;
public
class
JsonWebKey
{
public
string
Kty
{
get
;
set
;
}
public
string
Alg
{
get
;
set
;
}
public
string
?
Kty
{
get
;
set
;
}
public
string
?
Alg
{
get
;
set
;
}
[
JsonPropertyName
(
"key_ops"
)]
[
JsonProperty
(
"key_ops"
)]
public
string
[]
KeyOps
{
get
;
set
;
}
public
string
E
{
get
;
set
;
}
public
string
N
{
get
;
set
;
}
public
string
D
{
get
;
set
;
}
public
string
P
{
get
;
set
;
}
public
string
Q
{
get
;
set
;
}
public
string
Dp
{
get
;
set
;
}
public
string
Dq
{
get
;
set
;
}
public
string
Qi
{
get
;
set
;
}
public
string
Kid
{
get
;
set
;
}
public
string
[]?
KeyOps
{
get
;
set
;
}
public
string
?
E
{
get
;
set
;
}
public
string
?
N
{
get
;
set
;
}
public
string
?
D
{
get
;
set
;
}
public
string
?
P
{
get
;
set
;
}
public
string
?
Q
{
get
;
set
;
}
public
string
?
Dp
{
get
;
set
;
}
public
string
?
Dq
{
get
;
set
;
}
public
string
?
Qi
{
get
;
set
;
}
public
string
?
Kid
{
get
;
set
;
}
public
static
JsonWebKey
Deserialize
(
string
publicKey
)
=>
JsonSerializer
.
Deserialize
<
JsonWebKey
>(
publicKey
)
??
throw
new
ArgumentNullException
(
nameof
(
publicKey
));
public
string
ToJson
()
{
var
jsonSerializerOptions
=
new
JsonSerializerOptions
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment