pub fn policy_token(
fix_dirs: bool,
path: PathBuf,
secret_path: PathBuf,
initiator: String,
system: String,
exp: Duration,
) -> Result<(), Error>Expand description
Generates a new access token for the checker.
§Arguments
fix_dirs: if true, will generate missing directories instead of complaining.path: The path to write thepolicy_jwt.jsonto.secret_path: The path to thepolicy_secret.jsonfile to use to sign the token with.initiator: The name of the person performing the request, to embed in the token.system: The name or identifier of the node or other entity through which the request is performed, to embed in the token.exp: The duration the token will be valid for.
§Errors
This function may error if we encountered any I/O errors.