Remove Encryption Contexts

These functions remove an encryption context, or all encryption contexts, from those available to the user session.

This can be used by customers in a script to further limit the encryption contexts that are available to a user under certain conditions. For example, a synchronous Script Action triggered by the session.established event could remove all encryption contexts if a user was not connecting from an IP in a certain range.

if (some condition) {
   var contexts = gs.getSession().getEncryptionContext();
   contexts.removeAllContexts();
}

Individual encryption contexts can be removed as well using the sys_id of the encryption context.

if (some condition) {
   var contexts = gs.getSession().getEncryptionContext();
   contexts.removeContext("077d9b3307211000e2bb5720e1021e61");
}