33Authentication is the process by which an identity is presented to the application. It ensures that the entity
44making the request has the proper credentials to access the API.
55
6- ** DotKernel API** identities are delivered to the application from the client through the ` Authorization ` request
6+ ** DotKernel API** identities are delivered to the application from the client through the ` Authorization ` request.
77If it is present, the application tries to find and assign the identity to the application. If it is not presented,
88DotKernel API assigns a default ` guest ` identity, represented by an instance of the class
99` Mezzio\Authentication\UserInterface ` .
1010
1111## Configuration
1212
13- Authentication in DotKernel API is built around ` mezzio/mezzio-authentication-oauth2 ` component and is already
14- configured with what is necessary in order to work . But if you want to dig more, the configuration is stored in
13+ Authentication in DotKernel API is built around the ` mezzio/mezzio-authentication-oauth2 ` component and is already
14+ configured out of the box . But if you want to dig more, the configuration is stored in
1515` config/autoload/local.php ` under the ` authentication ` key.
1616
1717> You can check the
@@ -27,17 +27,17 @@ The authentication happens through the middleware in the `Api\App\Middleware\Aut
2727
2828## Database
2929
30- When ** DotKernel API** is installed for the first time, and you run the migrations and seeders, all the tables
31- needed for authentication are automatically created and populated with the data needed for authentication .
30+ When you install ** DotKernel API** for the first time, you need to run the migrations and seeders. All the tables
31+ required for authentication are automatically created and populated.
3232
33- In DotKernel API, authenticated users come from either the ` admin ` or the ` users ` table. We choose to keep the admin
33+ In DotKernel API, authenticated users come from either the ` admin ` or the ` user ` table. We choose to keep the admin
3434table separated from the users to prevent users of the application from accessing sensitive data, which only the
3535administrators of the application should access.
3636
37- Knowing this, upon migrations, the ` oauth_clients ` table is pre-populated with the default ` admin ` and ` frontend `
38- clients with the same password as their names (you can change those passwords).
37+ The ` oauth_clients ` table is pre-populated with the default ` admin ` and ` frontend ` clients with the same password as
38+ their names (** we recommend you change the default passwords** ).
3939
40- As you guessed each client serves to authenticate ` admin ` or ` users ` .
40+ As you guessed each client serves to authenticate ` admin ` or ` user ` .
4141
4242Another table that is pre-populated is the ` oauth_scopes ` table, with the ` api ` scope.
4343
@@ -91,8 +91,7 @@ Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...
9191
9292### Refreshing tokens
9393
94- DotKernel API provides the ability to refresh the access token, by generating a new one using the expired access
95- token's ` refresh_token ` .
94+ DotKernel API can refresh the access token, based on the expired access token's ` refresh_token ` .
9695
9796The clients need to send a ` POST ` request to the ` /security/refresh-token ` with the following request
9897
0 commit comments