@@ -84,7 +84,7 @@ public function setAccessToken($oauth_token, $client_id, $user_id, $expires, $sc
84
84
*
85
85
* Retrieve the stored data for the given authorization code.
86
86
*
87
- * Required for OAUTH2_GRANT_TYPE_AUTH_CODE .
87
+ * Required for OAuth2::GRANT_TYPE_AUTH_CODE .
88
88
*
89
89
* @param $code
90
90
* Authorization code to be check with.
@@ -111,7 +111,7 @@ public function getAuthCode($code);
111
111
* any sort of success/failure, so you should bail out of the script
112
112
* and provide a descriptive fail message.
113
113
*
114
- * Required for OAUTH2_GRANT_TYPE_AUTH_CODE .
114
+ * Required for OAuth2::GRANT_TYPE_AUTH_CODE .
115
115
*
116
116
* @param $code
117
117
* Authorization code to be stored.
@@ -135,7 +135,7 @@ public function setAuthCode($code, $client_id, $user_id, $redirect_uri, $expires
135
135
*
136
136
* Retrieve the stored data for the given refresh token.
137
137
*
138
- * Required for OAUTH2_GRANT_TYPE_REFRESH_TOKEN .
138
+ * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN .
139
139
*
140
140
* @param $refresh_token
141
141
* Refresh token to be check with.
@@ -162,7 +162,7 @@ public function getRefreshToken($refresh_token);
162
162
* any sort of success/failure, so you should bail out of the script
163
163
* and provide a descriptive fail message.
164
164
*
165
- * Required for OAUTH2_GRANT_TYPE_REFRESH_TOKEN .
165
+ * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN .
166
166
*
167
167
* @param $refresh_token
168
168
* Refresh token to be stored.
@@ -201,7 +201,7 @@ public function unsetRefreshToken($refresh_token);
201
201
* Not really described in the IETF Draft, so I just left a method
202
202
* stub... Do whatever you want!
203
203
*
204
- * Required for OAUTH2_GRANT_TYPE_NONE .
204
+ * Required for OAuth2::GRANT_TYPE_NONE .
205
205
*
206
206
* @ingroup oauth2_section_4
207
207
*/
@@ -215,7 +215,7 @@ public function checkNoneAccess($client_id);
215
215
* You can also use the $client_id param to do any checks required based
216
216
* on a client, if you need that.
217
217
*
218
- * Required for OAUTH2_GRANT_TYPE_ASSERTION .
218
+ * Required for OAuth2::GRANT_TYPE_ASSERTION .
219
219
*
220
220
* @param $client_id
221
221
* Client identifier to be check with.
@@ -250,7 +250,7 @@ public function checkAssertion($client_id, $assertion_type, $assertion);
250
250
* You can also use the $client_id param to do any checks required based
251
251
* on a client, if you need that.
252
252
*
253
- * Required for OAUTH2_GRANT_TYPE_USER_CREDENTIALS .
253
+ * Required for OAuth2::GRANT_TYPE_USER_CREDENTIALS .
254
254
*
255
255
* @param $client_id
256
256
* Client identifier to be check with.
@@ -288,7 +288,7 @@ public function checkUserCredentials($client_id, $username, $password);
288
288
* Client identifier to be check with.
289
289
* @param $response_type
290
290
* Authorization response type to be check with, would be one of the
291
- * values contained in OAUTH2_AUTH_RESPONSE_TYPE_REGEXP .
291
+ * values contained in OAuth2::RESPONSE_TYPE_REGEXP .
292
292
*
293
293
* @return
294
294
* TRUE if the authorization response type is supported by this
@@ -308,7 +308,7 @@ public function checkRestrictedAuthResponseType($client_id, $response_type);
308
308
* Client identifier to be check with.
309
309
* @param $grant_type
310
310
* Grant type to be check with, would be one of the values contained in
311
- * OAUTH2_GRANT_TYPE_REGEXP .
311
+ * OAuth2::GRANT_TYPE_REGEXP .
312
312
*
313
313
* @return
314
314
* TRUE if the grant type is supported by this client identifier, and
@@ -319,8 +319,24 @@ public function checkRestrictedAuthResponseType($client_id, $response_type);
319
319
public function checkRestrictedGrantType ($ client_id , $ grant_type );
320
320
321
321
/**
322
- *
323
- * Enter description here ...
324
- */
322
+ * Return supported grant types.
323
+ *
324
+ * You should override this function with something, or else your OAuth
325
+ * provider won't support any grant types!
326
+ *
327
+ * @return
328
+ * A list as below. If you support all grant types, then you'd do:
329
+ * @code
330
+ * return array(
331
+ * OAuth2::GRANT_TYPE_AUTH_CODE,
332
+ * OAuth2::GRANT_TYPE_USER_CREDENTIALS,
333
+ * OAuth2::GRANT_TYPE_ASSERTION,
334
+ * OAuth2::GRANT_TYPE_REFRESH_TOKEN,
335
+ * OAuth2::GRANT_TYPE_NONE,
336
+ * );
337
+ * @endcode
338
+ *
339
+ * @ingroup oauth2_section_4
340
+ */
325
341
public function getSupportedGrantTypes ();
326
342
}
0 commit comments