Skip to content

Commit d9c1d20

Browse files
committed
Add an entry on authorization. closes #766
1 parent cdcd04c commit d9c1d20

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ backed by ActiveRecord models or by custom objects.
4343
* [Key Format] (#key-format)
4444
* [Routing] (#routing)
4545
* [Nested Routes] (#nested-routes)
46+
* [Authorization](#authorization)
4647
* [Configuration] (#configuration)
4748
* [Contributing] (#contributing)
4849
* [License] (#license)
@@ -1199,7 +1200,7 @@ rails generate jsonapi:controller contact
11991200
###### ResourceControllerMetal
12001201
12011202
`JSONAPI::Resources` also provides an alternative class to `ResourceController` called `ResourceControllerMetal`.
1202-
In order to provide a lighter weight controller option this strips the controller down to just the classes needed
1203+
In order to provide a lighter weight controller option this strips the controller down to just the classes needed
12031204
to work with `JSONAPI::Resources`.
12041205
12051206
For example:
@@ -1211,7 +1212,7 @@ end
12111212
```
12121213
12131214
Note: This may not provide all of the expected controller capabilities if you are using additional gems such as DoorKeeper.
1214-
1215+
12151216
###### Serialization Options
12161217
12171218
Additional options can be passed to the serializer using the `serialization_options` method.
@@ -1887,6 +1888,15 @@ phone_number_contact GET /phone-numbers/:phone_number_id/contact(.:format) co
18871888
18881889
```
18891890
1891+
### Authorization
1892+
1893+
To this day `json-api-resources` doesn't come with built-in primitives for authorization. However multiple users of the framework have come up with different approaches, check out:
1894+
1895+
- [jsonapi-authorization](https://github.com/venuu/jsonapi-authorization)
1896+
- [pundit-resources](https://github.com/togglepro/pundit-resources)
1897+
1898+
Refer to the comments/discussion [here](https://github.com/cerebris/jsonapi-resources/issues/16#issuecomment-222438975) for the differences between approaches
1899+
18901900
## Configuration
18911901

18921902
JR has a few configuration options. Some have already been mentioned above. To set configuration options create an

0 commit comments

Comments
 (0)