https://www.ory.sh/ logo
#talk-kratos
Title
# talk-kratos
m

miniature-beach-16869

02/07/2022, 4:35 PM
In this schema file what is "ory.sh/kratos". I am confused about this custom key in json schema, how does it work?
Copy code
{
  "$id": "<https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json>",
  "$schema": "<http://json-schema.org/draft-07/schema#>",
  "title": "Person",
  "type": "object",
  "properties": {
    "traits": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "title": "E-Mail",
          "minLength": 3,
---------------------------------------------------------
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              }
            },
            "verification": {
              "via": "email"
            },
            "recovery": {
              "via": "email"
            }
          }
---------------------------------------------------------
        },
        "name": {
          "type": "object",
          "properties": {
            "first": {
              "title": "First Name",
              "type": "string"
            },
            "last": {
              "title": "Last Name",
              "type": "string"
            }
          }
        }
      },
      "required": [
        "email"
      ],
      "additionalProperties": false
    }
  }
}
m

magnificent-energy-493

02/07/2022, 4:46 PM
you mean credentials?
or what exactly was your question 😅
m

miniature-beach-16869

02/07/2022, 4:58 PM
Copy code
"email": {
          "type": "string",
          "format": "email",
          "title": "E-Mail",
          "minLength": 3,
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              }
            },
            "verification": {
              "via": "email"
            },
            "recovery": {
              "via": "email"
            }
          }
        },
In this section "email" is a string with format email and minLength 3. then what is "ory.sh/kratos". This schema should be generic right? I can't understand this schema. Please tell me if I am still unable to explain what I am trying to ask? 😅
Custom extensions are explicitly allowed in the json schema standard, and we use this one to mark which keys hold what special value (e.g. the identifier used for password auth)
m

miniature-beach-16869

02/07/2022, 5:33 PM
oh, okay. Now I got the idea.
Thank you so much
2 Views