|virtual AutoPtr< CredentialInfo >||getCredential (AuthTargetType inAuthTargetType, const String &inAuthTarget, u32 inFlags=0)=0|
|Public Member Functions inherited from Celartem::Referable|
|void||addRef () const|
|void||releaseRef () const|
|size_t||getReferenceCount () const|
< CredentialProvider >
|createFromStrings (const String &inUserName, const String &inPassword, const String &inTarget=NullString)|
< CredentialProvider >
|create (void *inParentHandle, const String &inCaption, const String &inMessage=NullString, unsigned long inFlags=0)|
|Static Public Member Functions inherited from Celartem::Referable|
|static void||dumpDbgAllRefCount ()|
CredentialProvider defines the interface of retrieving credential information. All PixelLive/PixelSafe functions which handle the credential information use this class. You can create your own CredentialProvider classes that bridges the your GUI/CUI codes that interacts with the users to this library. For the most easiest case, if an application already has the user name and password in plain string, use createFromStrings function to create CredentialProvider instance. For more information about CredentialProvider or authentication, see authToDoc.
Note that CredentialProvider implementation can ignore these flags and they are just advisary.
This function creates a GUI version of CredentialProvider instance. If getCredential method is called, the instance shows some dialog that prompts the user to input his user name and password.
Currently, this function is only provided on the following platforms:
|inParentHandle||Platform dependent parent window handle. On windows, this is |
|inCaption||The caption for the dialog.|
|inMessage||The message for the dialog. If this is NullString, the GUI shows the |
|inFlags||Reserved. It must be 0.|
This function creates a CredentialProvider instance from the pair of user name and password.
The CredentialProvider instance created by the function internally uses SecureString to preserve the information and it is more secure than preserving username and password in plain text.
|inUserName||The user name.|
|inPassword||The password for the user name.|
|inTarget||The target of this credential information.|
The following code illustrates how to use this function in your code:
This method returns a CredentialInfo instance that holds the credential for the specified target. The way the method actually retrieves the credential is not defined; it may show some dialog to prompt the user to input his User name and password or it may load the information from private credential store such as key-chain or something like it.
|inAuthTargetType||One of the AuthTargetType enumeration value.|
|inAuthTarget||Human readable string that uniquely identifies the authentication target. The actual value of this parameter is defined by inAuthTargetType: |
|inFlags||Any combination of GetCredentialFlag enumeration values.|