OxL Reference

method Principal.dynSpec

user:<id>:<roles,csv>:<tenant>, service:<name>:<role>, node:<id> or anonymous: the text the audit log and the control socket use.

Example:

oxl✓ checked in CI
fn main() io {
  let p = Principal.User("ann", ["Admin", "Support"], Map.new(), false, "acme")
  print(p.dynSpec())
  print(Principal.Anonymous.dynSpec())
}
Output
user:ann:Admin,Support:acme
anonymous
pub(api) fn dynSpec() -> str

Complexity. O(roles).

Since. 1.0.0-beta

Returns

str

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/dynconf.oxl:227

See also