4 * This file is (c) Copyright 2010 by Olivier BERGER, Madhumita DHAR, Institut TELECOM
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * This program has been developed in the frame of the COCLICO
21 * project with financial support of its funders.
25 require_once('../../env.inc.php');
26 require_once $gfwww.'include/pre.php';
27 require_once 'checks.php';
29 $pluginname = 'oauthprovider';
31 form_key_is_valid(getStringFromRequest('plugin_oauthprovider_token_delete_token'));
33 //access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); // equivalent function to be added later for ff
34 //session_require_global_perm('project_admin');
36 $f_token_id = getStringFromGet( 'token_id' );
37 $f_type = getStringFromGet( 'token_type' );
39 if($f_type == 'access') {
40 $t_token = OauthAuthzAccessToken::load( $f_token_id );
42 else if ($f_type == 'request'){
43 $t_token = OauthAuthzRequestToken::load( $f_token_id );
46 //helper_ensure_confirmed( sprintf( $plugin_oauthprovider_ensure_token_delete, $t_token->key ), _('Delete')_token );
47 //equivalent for fusionforge not found yet
51 form_release_key(getStringFromRequest('plugin_oauthprovider_token_delete_token'));
52 session_redirect( '/plugins/'.$pluginname.'/'. $f_type.'_tokens.php');