2 * rs-serve - (c) 2013 Niklas E. Cathor
4 * This program is distributed in the hope that it will be useful,
5 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7 * GNU Affero General Public License for more details.
9 * You should have received a copy of the GNU Affero General Public License
10 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "common/auth.h"
21 static void print_usage(char *progname) {
22 fprintf(stderr, "Usage: %s <user> <token>\n", progname);
25 int main(int argc, char **argv) {
30 open_authorizations("r+");
31 struct rs_authorization auth;
32 auth.username = argv[1];
35 int success = remove_authorization(&auth);
36 close_authorizations();
37 fprintf(stderr, (success == 0) ? "Token removed.\n" : "Token not found!\n");