Skip to content

Commit

Permalink
docs: clean up docs and correct samples
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Sep 13, 2020
1 parent 30e25e7 commit 8627ec5
Show file tree
Hide file tree
Showing 58 changed files with 449 additions and 948 deletions.
2 changes: 1 addition & 1 deletion docs/docs/admin/managing-users-identities.mdx
Expand Up @@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem'

This document walks you through the administrative identity management in ORY
Kratos. You should already be familiar with the
[Identity Data Model](../concepts/identity-data-model) before reading this
[Identity Data Model](../concepts/identity-data-model.md) before reading this
guide.

## Creating an Identity
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/concepts/credentials/openid-connect-oidc-oauth2.mdx
Expand Up @@ -12,7 +12,7 @@ provider (for example [ORY Hydra](https://www.ory.sh/hydra)). "Social Sign In"
or "Sign in with ..." are common aliases for this flow.

This strategy expects that you've set up your
[Default Identity JSON Schema](../identity-user-model).
[Default Identity JSON Schema](../identity-data-model.md).

## Configuration

Expand Down Expand Up @@ -289,4 +289,4 @@ until the identity's traits are valid against the defined JSON Schema.

For more information on this flow (network flow, examples, UI, ...) head over to
the
[OpenID Connect and OAuth2 Self-Service Method Documentation](../../self-service/flows/user-login-user-registration/openid-connect-social-sign-in-oauth2.mdx).
[OpenID Connect and OAuth2 Self-Service Method Documentation](../../self-service/flows/user-registration.mdx).
4 changes: 2 additions & 2 deletions docs/docs/concepts/credentials/username-email-password.mdx
Expand Up @@ -9,8 +9,8 @@ during registration and login.

ORY Kratos hashes the password after registration, password reset, and password
change using the [Argon2 Hashing Algorithm](../../concepts/security#Argon2), the
winner of the (https://github.com/P-H-C/phc-winner-argon2)[Password Hashing
Competition (PHC)].
winner of the [Password Hashing
Competition (PHC)](https://github.com/P-H-C/phc-winner-argon2).

## Configuration

Expand Down
112 changes: 57 additions & 55 deletions docs/docs/concepts/identity-data-model.md
Expand Up @@ -14,7 +14,9 @@ In ORY Kratos' terminology we call all of them "identities", and it is always
exposed as `identity` in the API endpoints, requests, and response payloads. In
the documentation however, we mix these words as "account recovery" or "account
activation" is a widely accepted and understood terminology and user flow, while
"identity recovery" or "identity activation" is not. :::
"identity recovery" or "identity activation" is not.

:::

The following examples use YAML for improved readability. However, the API
payload is usually in JSON format. An `identity` has the following properties:
Expand Down Expand Up @@ -75,7 +77,7 @@ Identities are
[#596](https://github.com/ory/kratos/issues/596)).

The identity state is therefore `active` or `disabled` (not yet implemented see
[#598](https://github.com/ory/kratos/issues/598):
[#598](https://github.com/ory/kratos/issues/598))

<Mermaid
chart={`stateDiagram-v2 [*] --> Active: create Active --> Active: update Active --> Disabled: disable Disabled --> [*]: delete Disabled --> Active: enable`}
Expand Down Expand Up @@ -168,27 +170,27 @@ meaning you have to specify these in the schema. This includes for example:

ORY Kratos' JSON Schema Vocabulary Extension can be used within a property:

```json5
```json
{
$id: 'http://mydomain.com/schemas/v2/customer.schema.json',
$schema: 'http://json-schema.org/draft-07/schema#',
title: 'A customer (v2)',
type: 'object',
properties: {
traits: {
type: 'object',
properties: {
email: {
title: 'E-Mail',
type: 'string',
format: 'email',
"$id": "http://mydomain.com/schemas/v2/customer.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A customer (v2)",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"title": "E-Mail",
"type": "string",
"format": "email",

// This tells ORY Kratos that the field should be used as the "username" for the username+password flow.
// It is an extension to the regular JSON Schema vocabulary.
'ory.sh/kratos': {
credentials: {
password: {
identifier: true
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
Expand All @@ -207,12 +209,12 @@ You can configure ORY Kratos to use specific fields as the _identifier_ e.g.
username, email, phone number, etc., in the Username and Password Registration
and Login Flow:

```json5
```json
{
'ory.sh/kratos': {
credentials: {
password: {
identifier: true
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
Expand All @@ -235,50 +237,50 @@ traits:
and using a JSON Schema that uses the `email` field as the identifier for the
password flow

```json5
```json
{
$id: 'http://mydomain.com/schemas/v2/customer.schema.json',
$schema: 'http://json-schema.org/draft-07/schema#',
title: 'A customer (v2)',
type: 'object',
properties: {
traits: {
type: 'object',
properties: {
email: {
title: 'E-Mail',
type: 'string',
format: 'email',
"$id": "http://mydomain.com/schemas/v2/customer.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A customer (v2)",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"title": "E-Mail",
"type": "string",
"format": "email",

// This tells ORY Kratos that the field should be used as the "username" for the Username and Password Flow.
'ory.sh/kratos': {
credentials: {
password: {
identifier: true
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
},
name: {
type: 'object',
properties: {
first: {
type: 'string'
"name": {
"type": "object",
"properties": {
"first": {
"type": "string"
},
last: {
type: 'string'
"last": {
"type": "string"
}
}
},
favorite_animal: {
type: 'string'
"favorite_animal": {
"type": "string"
},
accepted_tos: {
type: 'string'
"accepted_tos": {
"type": "string"
}
},
required: ['email'],
additionalProperties: false
"required": ["email"],
"additionalProperties": false
}
}
}
Expand All @@ -288,7 +290,7 @@ In this example, ORY Kratos understands that traits:email: `office@ory.sh` is
the identity's identifier. The system expects `office@ory.sh` plus a password to
sign in.

[Username and Password Credentials](credentials.md#username-and-password)
[Username and Password Credentials](credentials/username-email-password.mdx)
contains more information and examples.

There are currently no other extensions supported for Identity Traits. Further
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/concepts/index.md
Expand Up @@ -230,7 +230,7 @@ ORY has numerous products that support the protocols OAuth2 or OpenID Connect in
### Software Architecture

ORY's
[Software Architecture and Philosophy](../../ecosystem/software-architecture-philosophy)
[Software Architecture and Philosophy](https://www.ory.sh/docs/ecosystem/software-architecture-philosophy)
document, explains the architectural beliefs and framework behind the ORY
Products in particular:

Expand Down Expand Up @@ -258,7 +258,7 @@ very easy to get started there is a reference implementation
[github.com/ory/kratos-selfservice-ui-node](https://github.com/ory/kratos-selfservice-ui-node).

For more details about each individual flow, consult the
[Self-Service Flows Chapter](../self-service/flows/index).
[Self-Service Flows Chapter](../self-service.mdx).

### Bring your own Identity Model(s)

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/images/quickstart/secureapp-login.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8627ec5

Please sign in to comment.