Esempio n. 1
0
 /**
  *  Register Client in database and application
  *	Register app
  *	Based on simple form.
  */
 public function registerclient($payload = null)
 {
     $payload = $payload ?: json_decode(Input::get('payload'));
     $client = new Oauth2Client();
     $client->appendPayload($payload)->save();
     return $client->schema('basic');
 }
 public function run()
 {
     $client = new Oauth2Client();
     $client->setClientId()->setClientSecret()->setName('Project app')->setRedirectUri('http://localhost/projectapp/auth.html');
     User::first()->oauth2clients()->save($client);
 }