Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 9e25fa4

Browse files
committed
Update gs-authentication.md
- Fix typos - More information on ACL
1 parent 09fc630 commit 9e25fa4

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

guides/v1.0/get-started/authentication/gs-authentication.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ github_link: get-started/authentication/gs-authentication.md
1414
Magento allows developers to define web API resources and their permissions in a configuration file <code>webapi.xml</code>.
1515
Here are more details on exposing <a href="http://devdocs.magento.com/guides/v1.0/extension-dev-guide/service-contracts/service-to-web-service.html">services as Web APIs.</a>
1616

17-
Before you can make web API calls, you must authenticate your identity and have requisite permissions (authorization) to access the API resource. Authentication allows Magento to identify the caller's user type. Based on the user's (admin, integration, customer or guest) access rights, API calls' resource acessibility is determined.
17+
Before you can make web API calls, you must authenticate your identity and have necessary permissions (authorization) to access the API resource. Authentication allows Magento to identify the caller's user type. Based on the user's (admin, integration, customer or guest) access rights, API calls' resource acessibility is determined.
1818
</p>
1919

2020
<h3 id="accessible-resources">Accessible resources</h3>
@@ -26,18 +26,18 @@ Before you can make web API calls, you must authenticate your identity and have
2626
</tr>
2727
<tr>
2828
<td>
29-
<p>Customer</p>
29+
<p>Admin or Integration</p>
3030
</td>
31-
<td>
32-
<p>Resources with <code>anonymous</code> or <code>self</code> permission.</p>
31+
<td>e
32+
<p>Resources for which admins or integrations are authorized. For example, if admins are authorized for the <code>Magento_Customer::group</code> resource, they can make a <code>GET&nbsp;/V1/customerGroups/:id</code> call.</p>
3333
</td>
3434
</tr>
3535
<tr>
3636
<td>
37-
<p>Admin or Integration</p>
37+
<p>Customer</p>
3838
</td>
3939
<td>
40-
<p>Resources for which admins or integrations are authorized. For example, if admins are authorized for the <code>Magento_Customer::group</code> resource, they can make a <code>GET&nbsp;/V1/customerGroups/:id</code> call.</p>
40+
<p>Resources with <code>anonymous</code> or <code>self</code> permission.</p>
4141
</td>
4242
</tr>
4343
<tr>
@@ -51,10 +51,12 @@ Before you can make web API calls, you must authenticate your identity and have
5151
</table>
5252

5353
<h3 id="acl-webapi-relation">Relation between acl.xml and webapi.xml</h3>
54-
<p>The acl.xml file defines the access control list (ACL) for a given module. It defines available set of permissions to access the resources. acl.xml files across all Magento modules are consolidated to build an ACL tree which is used to select allowed Admin role resources or third party Integration's access (System > Extension > Integration > Add New Integration > Available APIs).
54+
<p>The acl.xml file defines the access control list (ACL) for a given module. It defines available set of permissions to access the resources.
55+
acl.xml files across all Magento modules are consolidated to build an ACL tree which is used to select allowed Admin role resources or third party Integration's access (System > Extension > Integration > Add New Integration > Available APIs).
56+
Overall <a href="http://www.magentocommerce.com/api/rest/permission_settings/permission_settings.html#PermissionSettings-Authorization">ACL concept</a> remains same as Magento 1, its just been extended to cover WebAPIs.
5557
</p>
5658
<h4 id="acl-webapi-relation">Sample customer acl.xml</h4>
57-
Ex: Account management, customer configuration, and customer group resource permissions are defined in the below customer acl.xml
59+
e.g.: Account management, customer configuration, and customer group resource permissions are defined in the below customer acl.xml
5860
```xml
5961
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
6062
<acl>
@@ -126,12 +128,12 @@ When a developer creates the Web API configuration file : webapi.xml, the permis
126128
.....
127129
...
128130
```
129-
ex:
131+
e.g.:
130132
In the above sample webapi.xml, for the customerGroups resource, only a user with a "Magento_Customer::group" can access the GET /V1/customerGroups/:id API. On the other hand, POST /V1/customers (customer creation) can be accessed anonymously (or by a guest) without a need for presenting the identity.
131133

132134
The user here can be an admin (or an Integration) defined in the backend with the customer group selected as one of the resource in the ACL tree.
133135
<div class="bs-callout bs-callout-info" id="info">
134-
<p>A guest or anonymous is a special permission that doesn't need to be defined in acl.xml (and will not show up in the acl tree in the backend). It just indicates that the current resource in webapi.xml can be accessed without the need for authentication. Similarly self is a special access if you already have an authenticated session with the system and allows the user to access resources they own. ex GET /V1/customers/me will fetch the logged in customer's details. This is typically useful for javascript based widgets. </p>
136+
<p>A guest or anonymous is a special permission that doesn't need to be defined in acl.xml (and will not show up in the acl tree in the backend). It just indicates that the current resource in webapi.xml can be accessed without the need for authentication. Similarly self is a special access if you already have an authenticated session with the system and allows the user to access resources they own. e.g. GET /V1/customers/me will fetch the logged in customer's details. This is typically useful for javascript based widgets. </p>
135137
</div>
136138

137139
<h3 id="webapi-clients">Web API clients and authentication methods</h3>
@@ -147,7 +149,7 @@ The user here can be an admin (or an Integration) defined in the backend with th
147149
<p>Mobile application</p>
148150
</td>
149151
<td>
150-
<p>Registered users use <a href="{{ site.gdeurl }}get-started/authentication/gs-authentication-token.html">token-based authentication</a> to make web API calls through a mobile application. The token acts like an electronic key that provides access the API.</p>
152+
<p>Registered users use <a href="{{ site.gdeurl }}get-started/authentication/gs-authentication-token.html">token-based authentication</a> to make web API calls through a mobile application. The token acts like an electronic key that provides access to the API(s).</p>
151153
<ol>
152154
<li>
153155
<p>As a registered Magento user, you request a token from the Magento token service at the endpoint that is defined for your user type.</p>

0 commit comments

Comments
 (0)