MarkLogic 12 EA 1 Product Documentation
sec.setRealm

sec.setRealm(
   realm as String
) as null

Summary

Changes the realm of this security database to $realm. If the realm is different from the old value this function also invalidates all the existing digest passwords since they will no longer work with the new realm. Warning: this invalidates all user's digest passwords, including the user running this function and users of the Admin Interface (if the Admin Interface is set to digest authentication, which is the default setting); once a user's digest password is invalidated, that user will no longer be able to log in with digest authentication.

Parameters
realm The new realm name to which the security database name is changed.

Usage Notes

This function must be executed against the security database.

Example


// execute this against the security database

declareUpdate(); 
const sec = require('/MarkLogic/security.xqy');

sec.setRealm("public")

// Sets the realm to "public." 
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy