18 #ifndef _das_credmngr_h_
19 #define _das_credmngr_h_
50 const char* sServer,
const char* sRealm,
const char* sDataset,
51 const char* sMessage,
char* sUser,
char* sPassword
55 typedef struct das_credential_t{
87 const char* sDataset,
const char* sHash
94 typedef struct das_credmngr{
98 char sLastAuthMsg[1024];
147 DasCredMngr* pThis,
const char* sServer,
const char* sRealm,
const char* sDataset
165 DasCredMngr* pThis,
const char* sServer,
const char* sRealm,
166 const char* sDataset,
const char* sMsg
bool(* das_prompt)(const char *sServer, const char *sRealm, const char *sDataset, const char *sMessage, char *sUser, char *sPassword)
Function signature for swapping out the user-prompt for credentials acquisition.
Definition: credentials.h:49
DasCredMngr * new_CredMngr(const char *sKeyStore)
Initialize a new credentials manager, optionally from a saved list.
Credentials manager Handles a list of login credentials and supplies these as needed for network oper...
Definition: credentials.h:94
A single credential.
Definition: credentials.h:55
das_prompt CredMngr_setPrompt(DasCredMngr *pThis, das_prompt new_prompt)
Change the function used to prompt users for das2 server credentials.
void CredMngr_authFailed(DasCredMngr *pThis, const char *sServer, const char *sRealm, const char *sDataset, const char *sMsg)
Let the credentials manager know that a particular authorization method failed.
A dynamic buffer with multi-dimensional array style access.
void del_CredMngr(DasCredMngr *pThis)
Delete a credentials manager free'ing it's internal credential store.
bool CredMngr_save(const DasCredMngr *pThis, const char *sFile)
Save the current credentials to the given filename.
int CredMngr_addCred(DasCredMngr *pThis, const das_credential *pCred)
Manually add a credential to a credentials manager instead of prompting the user. ...
bool das_cred_init(das_credential *pCred, const char *sServer, const char *sRealm, const char *sDataset, const char *sHash)
Initialize a credential to be cached in the credentials manager.
const char * CredMngr_getHttpAuth(DasCredMngr *pThis, const char *sServer, const char *sRealm, const char *sDataset)
Retrive an HTTP basic authentication token for a given dataset on a given server. ...
Dynamic recursive ragged arrays.
Definition: array.h:193