| 1 | <?php |
||
| 9 | class OauthClientsController extends BaseApiController |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * The name of the model that is used by the base api controller |
||
| 13 | * to preform actions like (add, edit ... etc). |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $model = 'oauthClients'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The validations rules used by the base api controller |
||
| 20 | * to check before add. |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $validationRules = [ |
||
| 24 | 'name' => 'required|max:255', |
||
| 25 | 'redirect' => 'required|url', |
||
| 26 | 'user_id' => 'required|exists:users,id', |
||
| 27 | 'revoked' => 'boolean' |
||
| 28 | ]; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Revoke the given client. |
||
| 32 | * |
||
| 33 | * @param integer $clientId Id of the client |
||
| 34 | * @return \Illuminate\Http\Response |
||
| 35 | */ |
||
| 36 | public function revoke($clientId) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Un revoke the given client. |
||
| 43 | * |
||
| 44 | * @param integer $clientId Id of the client |
||
| 45 | * @return \Illuminate\Http\Response |
||
| 46 | */ |
||
| 47 | public function unRevoke($clientId) |
||
| 51 | } |
||
| 52 |