Skip to main content

current_sub

Function current_sub 

Source
pub fn current_sub() -> Option<String>
Expand description

Get the JWT sub claim (stable user ID, e.g. Keycloak UUID). Returns None outside a request context or for non-JWT auth. Use for stable per-user keying (token store, etc.).