new Store(secureStoreFile)
Parameters:
Name | Type | Description |
---|---|---|
secureStoreFile |
string | The location of the xssecurestore file |
Examples
// content of the xssecurestore file localStore.xssecurestore
{}
function store() {
var config = {
name: "foo",
value: "bar"
};
var aStore = new $.security.Store("localStore.xssecurestore");
aStore.store(config);
}
function read() {
var config = {
name: "foo"
};
try {
var store = new $.security.Store("localStore.xssecurestore");
var value = store.read(config);
}
catch(ex) {
//do some error handling
}
}
Methods
-
read(parameters) → {string}
-
read values, accessible by all users of the application
Parameters:
Name Type Description parameters
$.security.Store~ReadParameters parameter object Throws:
Throws an error if the access fails or the parameters are invalidReturns:
The decrypted value- Type
- string
-
readForUser(parameters) → {string}
-
read values on user isolation level
Parameters:
Name Type Description parameters
$.security.Store~ReadParameters parameter object Throws:
Throws an error if the access or the parameters are invalidReturns:
The decrypted value- Type
- string
-
remove(parameters)
-
remove values on application isolation level
Parameters:
Name Type Description parameters
$.security.Store~DeletionParameters parameter object Throws:
Throws an error if the access or the parameters are invalid -
removeForUser(parameters)
-
remove values on user isolation level
Parameters:
Name Type Description parameters
$.security.Store~DeletionParameters parameter object Throws:
Throws an error if the access or the parameters are invalid -
store(parameters)
-
read values on user isolation level
Parameters:
Name Type Description parameters
$.security.Store~WriteParameters parameter object Throws:
Throws an error if the access or the parameters are invalid -
storeForUser(parameters)
-
stores user specific values, no other user can decrypt it
Parameters:
Name Type Description parameters
$.security.Store~WriteParameters parameter object Throws:
Throws an error if the access or the parameters are invalid
Type Definitions
-
DeletionParameters
-
Type:
- object
Properties:
Name Type Description name
string Identifier for the data to be stored -
ReadParameters
-
Type:
- object
Properties:
Name Type Description name
string Identifier for the data to be stored -
WriteParameters
-
Type:
- object
Properties:
Name Type Description name
string Identifier for the data to be stored value
string The data which shall be stored