Constructor
new GDCacheController()
Methods
clearCredentialsForMethod(method, success, fail)
Call this function to clear the cached credentials for a
particular authentication method, or to clear for all methods. Calling this
function clears the session cache, and the permanent cache if present.
(Currently, the BlackBerry Dynamics client library only has a permanent cache for
Kerberos authentication tickets.)
Parameters:
Name | Type | Description |
---|---|---|
method |
string | One of the following constants, specifying which cache
or caches are to be cleared:
|
success |
function | Callback function to invoke upon successful completion of the request. |
fail |
function | Callback function to invoke if the request cannot be completed. |
Example
function gdccOnSuccess(response) {
console.log("The function call succeeded.");
};
function gdccOnError(response) {
console.log("The function call failed: " + response);
};
function clearCredential(){
var method = "HTTPDigest";
try {
window.plugins.GDCacheController.clearCredentialsForMethod(method, gdccOnSuccess, gdccOnError);
} catch(e) {
throw new Error("A try catch error was caught on GDCacheController.clearCredentialsForMethod");
};
}
kerberosAllowDelegation(allow, success, fail)
Call this function to allow or disallow Kerberos delegation within BlackBerry Dynamics
secure communications. By default, Kerberos delegation is not allowed. When Kerberos delegation
is allowed, the BlackBerry Dynamics run-time behaves as follows:
- Kerberos requests will be for tickets that can be delegated.
- Application servers that are trusted for delegation can be sent tickets that can be delegated, if such tickets were issued.
- Kerberos requests will not be for tickets that can be delegated.
- No application server will be sent tickets that can be delegated, even if such tickets were issued.
Parameters:
Name | Type | Description |
---|---|---|
allow |
boolean | true to allow delegation, false to disallow. |
success |
function | Callback function to invoke upon successful completion of the request. |
fail |
function | Callback function to invoke if the request cannot be completed. |
Example
function gdccOnSuccess(response) {
console.log("The function call succeeded.");
};
function gdccOnError(response) {
console.log("The function call failed: " + response);
};
function clearCredential(){
try {
window.plugins.GDCacheController.kerberosAllowDelegation(true, gdccOnSuccess, gdccOnError);
} catch(e) {
throw new Error("A try catch error was caught on GDCacheController.kerberosAllowDelegation");
};
}