#include <das2/credentials.h>
Credentials manager Handles a list of login credentials and supplies these as needed for network operations.
|
| DasCredMngr * | new_CredMngr (const char *sKeyStore) |
| | Initialize a new credentials manager, optionally from a saved list. More...
|
| |
| void | del_CredMngr (DasCredMngr *pThis) |
| | Delete a credentials manager free'ing it's internal credential store. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| das_prompt | CredMngr_setPrompt (DasCredMngr *pThis, das_prompt new_prompt) |
| | Change the function used to prompt users for das2 server credentials. More...
|
| |
| bool | CredMngr_save (const DasCredMngr *pThis, const char *sFile) |
| | Save the current credentials to the given filename. More...
|
| |
Initialize a new credentials manager, optionally from a saved list.
- Parameters
-
| sKeyStore | If not NULL, the credentials manager will initialize itself from the given file. |
- Returns
- A new credentials manager allocated on the heap
Delete a credentials manager free'ing it's internal credential store.
- Parameters
-
| pThis | A pointer to the credentials manager structure to free. The pointer is no-longer valid after this call and should be set to NULL. |
| 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.
- Parameters
-
| pThis | A pointer to a credentials manager structure |
| sServer | The name of the server for which these credentials apply |
| sRealm | A string identifing the system the user will be authenticating too. |
| sDataset | The name of the dataset for which these credentials apply |
- Returns
- The auth token, NULL if no auth token could be supplied
| 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.
The credentials manager can use this information to re-prompt the user if desired
- Parameters
-
| pThis | A pointer to a credentials manager structure |
| sServer | The name of the server for which these credentials apply |
| sRealm | A string identifing the system the user will be authenticating too. |
| sDataset | The name of the dataset for which these credentials apply |
| sMsg | an optional message providing more details on why authentication failed |
Change the function used to prompt users for das2 server credentials.
The built-in password prompt function assumes a console application, it asks for a username then tries to set the controlling terminal to non-echoing I/O and asks for a password.
- Parameters
-
| pThis | a pointer to a credentials manager structure |
| new_prompt | The new function, or NULL if no password prompt should ever be issued |
- Returns
- The old password prompt function
| bool CredMngr_save |
( |
const DasCredMngr * |
pThis, |
|
|
const char * |
sFile |
|
) |
| |
Save the current credentials to the given filename.
- Parameters
-
| pThis | a pointer to a CredMngr structure |
| sFile | the file to hold the loosly encypted credentials |
The documentation for this struct was generated from the following file: