You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
562 B
C

#pragma once
#include <time.h>
struct client_app
{
struct {
char* name;
char* id;
char* secret;
} client;
char* redirect_uri;
char* auth_code;
char* access_token;
time_t last_used;
// auth_expires
};
struct client_app* client_app_from_id( const char* client_id );
struct client_app* client_app_new( const char* client_name );
void client_app_save( struct client_app* app );
void client_app_free( struct client_app* app );
void client_app_gen_auth_code( struct client_app* app );
void client_app_generate_access_token( struct client_app* app );