public function setAccessToken($access_token, $client_id, $user_id, $expires, $scope = null)
	{
		// format date like HUBzero does
		$expires = with(new Date($expires))->toSql();
		$created = with(new Date('now'))->toSql();

		// get the id for th client
		$client = $this->getClientDetails($client_id);

		// create access token
		$model = new \Components\Developer\Models\Accesstoken();
		$model->set('application_id', $client['id']);
		$model->set('access_token', $access_token);
		$model->set('uidNumber', $user_id);
		$model->set('expires', $expires);
		$model->set('created', $created);
		return $model->save();
	}
public function setAccessToken($access_token, $client_id, $user_id, $expires, $scope = null)
	{
		// format date like HUBzero does
		$expires = with(new Date($expires))->toSql();
		$created = with(new Date('now'))->toSql();

		// get the id for th client
		$client = $this->getClientDetails($client_id);

		// create access token
		$model = new \Components\Developer\Models\Accesstoken();
		$model->set('application_id', $client['id']);
		$model->set('access_token', $access_token);
		$model->set('uidNumber', $user_id);
		$model->set('expires', $expires);
		$model->set('created', $created);
		return $model->save();
	}
public function setAccessToken ( $ access_token , $ client_id , $ user_id , $ expires , $ scope = null ) { // format date like HUBzero does $ expires = with ( new Date ( $ expires ) ) -> toSql ( ) ; $ created = with ( new Date ( 'now' ) ) -> toSql ( ) ; // get the id for th client $ client = $ this -> getClientDetails ( $ client_id ) ; // create access token $ model = new \ Components \ Developer \ Models \ Accesstoken ( ) ; $ model -> set ( 'application_id' , $ client [ 'id' ] ) ; $ model -> set ( 'access_token' , $ access_token ) ; $ model -> set ( 'uidNumber' , $ user_id ) ; $ model -> set ( 'expires' , $ expires ) ; $ model -> set ( 'created' , $ created ) ; return $ model -> save ( ) ; }
Store access token data

@param   string  $access_token  Access token
@param   string  $client_id     Client Id
@param   string  $user_id       User identifier
@param   string  $expires       Access token expiration date/time
@param   string  $scope         Access token granted scope
@return  void
Store access token data