From 40983ad36bfe5f56243695479a5aae822d9ed940 Mon Sep 17 00:00:00 2001 From: mahdanoura Date: Fri, 5 Jul 2024 23:09:10 +0200 Subject: [PATCH] refractoring of the schema --- resources/schemas/wot_security.yaml | 40 ++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/resources/schemas/wot_security.yaml b/resources/schemas/wot_security.yaml index 50dc2a3..2558a54 100644 --- a/resources/schemas/wot_security.yaml +++ b/resources/schemas/wot_security.yaml @@ -1,7 +1,7 @@ id: https://raw.githubusercontent.com/w3c/wot-thing-description/main/wotsec name: wot_security title: wot_security -version: "1.1-11-June-2024" +version: "1.1-5-July-2024" description: |- LinkML schema for modelling the TD Security mechanisms. license: MIT @@ -37,10 +37,16 @@ slots: in: description: >- Specifies the location of security authentication information. + examples: + - value: one of header + - value: query + - value: body + - value: cookie + - value: auto authorization: description: >- URI of the authorization server. - range: uriorcurie + range: uri classes: @@ -64,7 +70,6 @@ classes: - description - descriptions - "@type" - BearerSecurityScheme: is_a: SecurityScheme description: >- @@ -78,14 +83,21 @@ classes: alg: description: >- Encoding, encryption, or digest algorithm. + examples: + - value: ES256 + - value: es512-256 format: description: >- Specifies format of security authentication information. + examples: + - value: jwt + - value: cwt + - value: jwe + - value: jws slots: - authorization - name - in - OAuth2SecurityScheme: is_a: SecurityScheme description: >- @@ -99,20 +111,26 @@ classes: description: >- Authorization flow. required: true + examples: + - value: code + - value: client token: description: >- URI of the token server. - range: uriorcurie + range: uri refresh: description: >- URI of the refresh server. - range: uriorcurie + range: uri scopes: description: >- Set of authorization scope identifiers provided as an array. These are provided in tokens returned by an authorization server and associated with forms in order to identify what resources a client may access and how. The values associated with a form should be chosen from those defined in an OAuth2SecurityScheme active on that form. - multivalued: true + exactly_one_of: + - range: string + - range: string + multivalued: true slots: - authorization @@ -132,7 +150,6 @@ classes: description: >- Array of two or more strings identifying other named security scheme definitions, all of which must be satisfied for access. multivalued: true - DigestSecurityScheme: is_a: SecurityScheme description: >- @@ -142,6 +159,9 @@ classes: qop: description: >- Quality of protection + examples: + - value: one of auth + - value: oath-int slots: - name - in @@ -159,14 +179,12 @@ classes: description: >- A security configuration corresponding to identified by the term nosec, indicating there is no authentication or other mechanism required to access the resource. - AutoSecurityScheme: is_a: SecurityScheme description: >- An automatic authentication security configuration identified by the term auto. This scheme indicates that the security parameters are going to be negotiated by the underlying protocols at runtime, subject to the respective specifications for the protocol (e.g. [[!RFC8288]] for Basic Authentication when using HTTP). - APISecurityScheme: is_a: SecurityScheme description: >- @@ -188,7 +206,6 @@ classes: identity: description: >- Identifier providing information which can be used for selection or confirmation. - APIKeySecurityScheme: is_a: SecurityScheme description: >- @@ -198,7 +215,6 @@ classes: slots: - in - enums: SecuritySchemeType: permissible_values: