diff --git a/README.md b/README.md index d3391a10..1b20ac03 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ A typical database entry has the following properties. { "permalink": "introduction", "title": "Introduction", - "contentPath": "./introduction.md", + "contentPath": "./http_overview.md", "category": "Guides" } ``` diff --git a/content/docs/ace/creating_commands.md b/content/docs/ace/creating_commands.md index cbe67d40..e515527d 100644 --- a/content/docs/ace/creating_commands.md +++ b/content/docs/ace/creating_commands.md @@ -2,7 +2,7 @@ Alongside using Ace commands, you may also create custom commands as part of your application codebase. The commands are stored inside the `commands` directory (at the root level). You may create a command by running the following command. -See also: [Make command](../reference/commands.md#makecommand) +See also: [Make command](../references/commands.md#makecommand) ```sh node ace make:command greet @@ -229,7 +229,7 @@ export default class GreetCommand extends BaseCommand { ## Dependency injection -Ace commands are constructed and executed using the [IoC container](../fundamentals/ioc_container.md). Therefore, you can type-hint dependencies on command lifecycle methods and use the `@inject` decorator to resolve them. +Ace commands are constructed and executed using the [IoC container](../../concepts/dependency_injection). Therefore, you can type-hint dependencies on command lifecycle methods and use the `@inject` decorator to resolve them. For demonstration, let's inject the `UserService` class in all the lifecycle methods. diff --git a/content/docs/ace/prompts.md b/content/docs/ace/prompts.md index 4a546b0c..fa5d7c3e 100644 --- a/content/docs/ace/prompts.md +++ b/content/docs/ace/prompts.md @@ -13,7 +13,7 @@ Prompts are interactive terminal widgets you can use to accept user input. Ace p Ace prompts are built with testing in mind. When writing tests, you may trap prompts and respond to them programmatically. -See also: [Testing ace commands](../testing/commandline_tests.md) +See also: [Testing ace commands](../../testing/console_tests) ## Displaying a prompt diff --git a/content/docs/ace/tui.md b/content/docs/ace/tui.md index 7268919f..5aacd7bd 100644 --- a/content/docs/ace/tui.md +++ b/content/docs/ace/tui.md @@ -4,7 +4,7 @@ Ace terminal UI is powered by the [@poppinss/cliui](https://github.com/poppinss/ The terminal UI primitives are built with testing in mind. When writing tests, you may turn on the `raw` mode to disable colors and formatting and collect all logs in memory to write assertions against them. -See also: [Testing Ace commands](../testing/commandline_tests.md) +See also: [Testing Ace commands](../../testing/console_tests) ## Displaying log messages diff --git a/content/docs/auth/access_tokens_guard.md b/content/docs/authentication/access_tokens_guard.md similarity index 95% rename from content/docs/auth/access_tokens_guard.md rename to content/docs/authentication/access_tokens_guard.md index 4966c442..21e2019d 100644 --- a/content/docs/auth/access_tokens_guard.md +++ b/content/docs/authentication/access_tokens_guard.md @@ -178,7 +178,7 @@ In the following example, we **find a user by id** and **issue them an access to The `.create` method accepts an instance of the User model and returns an instance of the [AccessToken](https://github.com/adonisjs/auth/blob/main/modules/access_tokens_guard/access_token.ts) class. -The `token.value` property contains the value (wrapped as a [Secret](../reference/helpers.md#secret)) that must be shared with the user. The value is only available when generating the token, and the user will not be able to see it again. +The `token.value` property contains the value (wrapped as a [Secret](../references/helpers.md#secret)) that must be shared with the user. The value is only available when generating the token, and the user will not be able to see it again. ```ts import router from '@adonisjs/core/services/router' @@ -235,7 +235,7 @@ await User.accessTokens.create(user, ['server:create', 'server:read']) ### Token abilities vs. Bouncer abilities -You should not confuse token abilities with [bouncer authorization checks](../digging_deeper/authorization.md#defining-abilities). Let's try to understand the difference with a practical example. +You should not confuse token abilities with [bouncer authorization checks](../security/authorization.md#defining-abilities). Let's try to understand the difference with a practical example. - Let's say you define a **bouncer ability that allows admin users to create new projects**. @@ -341,7 +341,7 @@ The `tokensUserProvider` method accepts the following options and returns an ins ## Authenticating requests Once the guard has been configured, you can start authenticating requests using the `auth` middleware or manually calling the `auth.authenticate` method. -The `auth.authenticate` method returns an instance of the User model for the authenticated user, or it throws an [E_UNAUTHORIZED_ACCESS](../reference/exceptions.md#e_unauthorized_access) exception when unable to authenticate the request. +The `auth.authenticate` method returns an instance of the User model for the authenticated user, or it throws an [E_UNAUTHORIZED_ACCESS](../references/exceptions.md#e_unauthorized_access) exception when unable to authenticate the request. ```ts import router from '@adonisjs/core/services/router' @@ -393,7 +393,7 @@ class PostsController { ### Get authenticated user or fail -If you do not like using the [non-null assertion operator](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-) on the `auth.user` property, you may use the `auth.getUserOrFail` method. This method will return the user object or throw [E_UNAUTHORIZED_ACCESS](../reference/exceptions.md#e_unauthorized_access) exception. +If you do not like using the [non-null assertion operator](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-) on the `auth.user` property, you may use the `auth.getUserOrFail` method. This method will return the user object or throw [E_UNAUTHORIZED_ACCESS](../references/exceptions.md#e_unauthorized_access) exception. ```ts import { HttpContext } from '@adonisjs/core/http' @@ -483,4 +483,4 @@ await User.accessTokens.delete(user, token.identifier) ``` ## Events -Please check the [events reference guide](../reference/events.md#access_tokens_authauthentication_attempted) to view the list of available events emitted by the access tokens guard. +Please check the [events reference guide](../references/events.md#access_tokens_authauthentication_attempted) to view the list of available events emitted by the access tokens guard. diff --git a/content/docs/auth/basic_auth_guard.md b/content/docs/authentication/basic_auth_guard.md similarity index 95% rename from content/docs/auth/basic_auth_guard.md rename to content/docs/authentication/basic_auth_guard.md index 231fb0ff..a0d3f332 100644 --- a/content/docs/auth/basic_auth_guard.md +++ b/content/docs/authentication/basic_auth_guard.md @@ -1,4 +1,4 @@ -# Basic authentication +# Basic authentication guard The basic auth guard is an implementation of the [HTTP authentication framework](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication), in which the client must pass the user credentials as a base64 encoded string via the `Authorization` header. The server allows the request if the credentials are valid. Otherwise, a web-native prompt is displayed to re-enter the credentials. @@ -33,7 +33,7 @@ The `basicAuthUserProvider` method creates an instance of the [BasicAuthLucidUse ## Preparing the User model -The model (`User` model in this example) configured with the `basicAuthUserProvider` must use the [AuthFinder](./verifying_user_credentials.md#using-the-auth-finder-mixin) mixin to verify the user credentials during authentication. +The model (`User` model in this example) configured with the `basicAuthUserProvider` must use the [AuthFinder](verifying_user_credentials.md#using-the-auth-finder-mixin) mixin to verify the user credentials during authentication. ```ts import { DateTime } from 'luxon' @@ -123,7 +123,7 @@ router ``` ### Get authenticated user or fail -If you do not like using the [non-null assertion operator](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-) on the `auth.user` property, you may use the `auth.getUserOrFail` method. This method will return the user object or throw [E_UNAUTHORIZED_ACCESS](../reference/exceptions.md#e_unauthorized_access) exception. +If you do not like using the [non-null assertion operator](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-) on the `auth.user` property, you may use the `auth.getUserOrFail` method. This method will return the user object or throw [E_UNAUTHORIZED_ACCESS](../references/exceptions.md#e_unauthorized_access) exception. ```ts import { middleware } from '#start/kernel' diff --git a/content/docs/auth/custom_auth_guards.md b/content/docs/authentication/custom_auth_guard.md similarity index 98% rename from content/docs/auth/custom_auth_guards.md rename to content/docs/authentication/custom_auth_guard.md index 44fa6a83..e0fa920c 100644 --- a/content/docs/auth/custom_auth_guards.md +++ b/content/docs/authentication/custom_auth_guard.md @@ -247,7 +247,7 @@ Authenticating a request includes: - Verifying its authenticity. - Fetching the user for whom the token was generated. -Our guard will need access to the [HttpContext](../http/http_context.md) to read request headers and cookies, so let's update the class `constructor` and accept it as an argument. +Our guard will need access to the [HttpContext](../concepts/http_context.md) to read request headers and cookies, so let's update the class `constructor` and accept it as an argument. ```ts // insert-start diff --git a/content/docs/auth/introduction.md b/content/docs/authentication/introduction.md similarity index 91% rename from content/docs/auth/introduction.md rename to content/docs/authentication/introduction.md index c4e8eb90..75bba793 100644 --- a/content/docs/auth/introduction.md +++ b/content/docs/authentication/introduction.md @@ -22,7 +22,7 @@ The auth package narrowly focuses on authenticating HTTP requests, and the follo - User registration features like **registration forms**, **email verification**, and **account activation**. - Account management features like **password recovery** or **email update**. -- Assigning roles or verifying permissions. Instead, [use bouncer](../digging_deeper/authorization.md) to implement authorization checks in your application. +- Assigning roles or verifying permissions. Instead, [use bouncer](../security/authorization.md) to implement authorization checks in your application.