Helper functions for authentication.  
More...
      
        
          | VTM_API int vtm_http_basic_auth_require | ( | vtm_http_res * | res, | 
        
          |  |  | const char * | realm | 
        
          |  | ) |  |  | 
      
 
Prepares the response so that basic authentication require headers are set.
- Parameters
- 
  
    | res | the response that where the headers should be set |  | realm | realm name for authentication |  
 
- Returns
- VTM_OK if the headers were successfully set 
- 
VTM_ERROR if an error occured 
 
 
      
        
          | VTM_API int vtm_http_basic_auth_read | ( | struct vtm_http_req * | req, | 
        
          |  |  | char ** | user, | 
        
          |  |  | char ** | pass | 
        
          |  | ) |  |  | 
      
 
Extracts basic authentication information from the request.
User and password string must be freed by the caller.
- Parameters
- 
  
    |  | req | the request where the information should be extracted |  | [out] | user | will be filled with pointer to user name |  | [out] | pass | will be filled with pointer to password |  
 
- Returns
- VTM_OK if the information were successfully extracted 
- 
VTM_ERROR if the information could not be retrieved