Skip to main content

is_local_iss

Function is_local_iss 

Source
pub fn is_local_iss(iss: &str, local_issuers: &[&str]) -> bool
Expand description

Returns true if iss belongs to a local node.

Used for pre-decode key routing (before a Claims object exists) and by Claims::is_local_to for post-decode subject derivation — both use identical criteria so routing and subject resolution are always consistent.

Rules:

  • Empty iss is always local (cluster-internal tokens have no issuer claim).
  • If local_issuers is non-empty: iss must exactly match one entry.
  • If local_issuers is empty (unconfigured node): only an empty iss is accepted as local; any non-empty iss is treated as federated.