You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-3Lines changed: 39 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,42 @@ This template support 3 most used authentication. (Actually it's not me who make
67
67
2. Query parameter: the access token is sent as a query parameter in the API URL, e.g., https://example.com/users?access-token=xxxxxxxx. Because most Web servers will keep query parameters in server logs, this approach should be mainly used to serve JSONP requests which cannot use HTTP headers to send access tokens.
68
68
3. OAuth 2: the access token is obtained by the consumer from an authorization server and sent to the API server via HTTP Bearer Tokens, according to the OAuth2 protocol.
69
69
70
+
## Global Configuration of AuthMethods and RateLimiter
71
+
This template provide global configuration to set your application supported authMethods. You can find global configuration from `app\config\params.php`. Set your supported authMethods and RateLimiter from this file.
// if you need other behaviors method use like this
97
+
// $behaviors['otherMethods'] = $value;
98
+
return $behaviors;
99
+
}
100
+
}
101
+
```
102
+
103
+
### Ratelimiter
104
+
To enable your ratelimiter configuration, please follow official guide from [Yii documentation](https://www.yiiframework.com/doc/guide/2.0/en/rest-rate-limiting).
105
+
70
106
## Auth Scenario
71
107
This template already have basic endpoint that you can use to start your REST-API. Such as:
72
108
@@ -92,9 +128,9 @@ Feel free to contribute if you have any idea.
0 commit comments