Oyster Harvest Area Closure Analysis 0.1
Prediction and analysis of NSW oyster harvest area closures.
Loading...
Searching...
No Matches
authenticate.h File Reference
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <cjson/cJSON.h>
#include <curl/curl.h>
#include <log.h>
#include "http.h"
Include dependency graph for authenticate.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WW_TOKEN_SIZE   100
 Willy weather access token size. More...
 
#define WW_DEFAULT_ENV_NAME   "WW_TOKEN"
 Willy weather default environmental variable name. More...
 

Functions

uint8_t WillyWeather_GetToken (const char *env_var_name)
 Get Willy Weather API token from environment variable. More...
 
uint8_t WillyWeather_CheckAccess (void)
 Check API token is initialised and available for use. More...
 

Variables

static char WW_TOKEN [WW_TOKEN_SIZE]
 

Macro Definition Documentation

◆ WW_DEFAULT_ENV_NAME

#define WW_DEFAULT_ENV_NAME   "WW_TOKEN"

Willy weather default environmental variable name.

◆ WW_TOKEN_SIZE

#define WW_TOKEN_SIZE   100

Willy weather access token size.

Function Documentation

◆ WillyWeather_CheckAccess()

uint8_t WillyWeather_CheckAccess ( void  )

Check API token is initialised and available for use.

Check Willy Weather API token has been initialised.

Returns
Integer representing access state (0 = success)

◆ WillyWeather_GetToken()

uint8_t WillyWeather_GetToken ( const char *  env_var_name)

Get Willy Weather API token from environment variable.

Obtain and populate Willy Weather access token from environment variable.

Parameters
env_var_nameName of environment variable where token is held.
Returns
Integer representing

Variable Documentation

◆ WW_TOKEN

char WW_TOKEN[WW_TOKEN_SIZE]
static