libdas2
das2 core C utilities
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Typedefs | Functions
credentials.h File Reference

Handle storing credentials during a Das2 session and optionally save them to a file. More...

Detailed Description

Handle storing credentials during a Das2 session and optionally save them to a file.

#include <stdio.h>
#include <das2/array.h>

Go to the source code of this file.

Data Structures

struct  das_credential
 A single credential. More...
 
struct  DasCredMngr
 Credentials manager Handles a list of login credentials and supplies these as needed for network operations. More...
 

Typedefs

typedef 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. More...
 

Functions

int CredMngr_addCred (DasCredMngr *pThis, const das_credential *pCred)
 Manually add a credential to a credentials manager instead of prompting the user. More...
 

Function Documentation

int CredMngr_addCred ( DasCredMngr pThis,
const das_credential pCred 
)

Manually add a credential to a credentials manager instead of prompting the user.

Typically when the credentials manager does not have a password it needs it calls the prompt function that was set using CredMngr_setPrompt() or the built in command line prompter if no prompt function has been set.

Parameters
pThisThe credentials manager structure that will hold the new credential in RAM
pCredThe credential to add. If an existing credential matches this one except for the hash value, the new hash will overwrite the old one.
Returns
The new number of cached credentials