Skip to content

Commit

Permalink
refractoring of the schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdanoura committed Jul 5, 2024
1 parent 49f193e commit 40983ad
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions resources/schemas/wot_security.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -64,7 +70,6 @@ classes:
- description
- descriptions
- "@type"

BearerSecurityScheme:
is_a: SecurityScheme
description: >-
Expand All @@ -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: >-
Expand All @@ -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

Expand All @@ -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: >-
Expand All @@ -142,6 +159,9 @@ classes:
qop:
description: >-
Quality of protection
examples:
- value: one of auth
- value: oath-int
slots:
- name
- in
Expand All @@ -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: >-
Expand All @@ -188,7 +206,6 @@ classes:
identity:
description: >-
Identifier providing information which can be used for selection or confirmation.
APIKeySecurityScheme:
is_a: SecurityScheme
description: >-
Expand All @@ -198,7 +215,6 @@ classes:
slots:
- in


enums:
SecuritySchemeType:
permissible_values:
Expand Down

0 comments on commit 40983ad

Please sign in to comment.